Changes between Initial Version and Version 1 of Ticket #34015


Ignore:
Timestamp:
Sep 15, 2022, 10:39:47 PM (2 years ago)
Author:
Thomas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34015 – Description

    initial v1  
    5252{{{
    5353Traceback (most recent call last):
    54   File "/opt/src/_sandbox/django_bug.py", line 23, in <module>
    55     qs = Child.objects.filter(media_object_id__startswith='c')
    56   File "/opt/venv/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
     54  File "/opt/src/orm_test.py", line 26, in <module>
     55    qs = Child.objects.filter(parent_object_id__startswith='c')
     56  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
    5757    return getattr(self.get_queryset(), name)(*args, **kwargs)
    58   File "/opt/venv/lib/python3.9/site-packages/django/db/models/query.py", line 1071, in filter
     58  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1420, in filter
    5959    return self._filter_or_exclude(False, args, kwargs)
    60   File "/opt/venv/lib/python3.9/site-packages/django/db/models/query.py", line 1089, in _filter_or_exclude
     60  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1438, in _filter_or_exclude
    6161    clone._filter_or_exclude_inplace(negate, args, kwargs)
    62   File "/opt/venv/lib/python3.9/site-packages/django/db/models/query.py", line 1096, in _filter_or_exclude_inplace
     62  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1445, in _filter_or_exclude_inplace
    6363    self._query.add_q(Q(*args, **kwargs))
    64   File "/opt/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1502, in add_q
     64  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1532, in add_q
    6565    clause, _ = self._add_q(q_object, self.used_aliases)
    66   File "/opt/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1532, in _add_q
     66  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1562, in _add_q
    6767    child_clause, needed_inner = self.build_filter(
    68   File "/opt/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1448, in build_filter
     68  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1478, in build_filter
    6969    condition = self.build_lookup(lookups, col, value)
    70   File "/opt/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1262, in build_lookup
     70  File "/opt/src/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1292, in build_lookup
    7171    raise FieldError(
    7272django.core.exceptions.FieldError: Related Field got invalid lookup: startswith
Back to Top