You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can be reproduced in PR #1345 using the following steps
Visit Person list view (should load fine)
Visit Place list view (you'll see a column called resident_name in the columns dropdown, it does not matter whether this is selected or not, but it is worth noting that this column points to "forename" column in Person)
Visit Person list view
You'll see this error - the mixup seems to arise from the new meaning of this column forename, it expects the column resident_name now in the Person view
TypeError at /sample_project.person/
'Meta.fields' must not contain non-model field names: resident_name
Request Method: GET
Request URL: http://127.0.0.1:8001/sample_project.person/
Django Version: 5.1.2
Exception Type: TypeError
Exception Value:
'Meta.fields' must not contain non-model field names: resident_name
Exception Location: /.cache/pypoetry/virtualenvs/apis-core-rdf-vnNGgzXk-py3.12/lib/python3.12/site-packages/django_filters/filterset.py, line 367, in get_filters
Raised during: apis_core.generic.views.List
Python Executable: /.cache/pypoetry/virtualenvs/apis-core-rdf-vnNGgzXk-py3.12/bin/python
Python Version: 3.12.3
Python Path:
['/usr/lib/python312.zip',
'/usr/lib/python3.12',
'/usr/lib/python3.12/lib-dynload',
'/.cache/pypoetry/virtualenvs/apis-core-rdf-vnNGgzXk-py3.12/lib/python3.12/site-packages']
Server time: Tue, 05 Nov 2024 05:58:05 -0600
The text was updated successfully, but these errors were encountered:
If we create `fake_field` by simply using `getattr` on the
`annotations.items()` we actually get the original field and then change
its name in the next line. But thats not what we want, because that
changes the field for the model it belongs to. We only want a temporary
field, so we can add it to the `extra_columns`.
Closes: #1346
If we create `fake_field` by simply using `getattr` on the
`annotations.items()` we actually get the original field and then change
its name in the next line. But thats not what we want, because that
changes the field for the model it belongs to. We only want a temporary
field, so we can add it to the `extra_columns`.
Closes: #1346
Can be reproduced in PR #1345 using the following steps
You'll see this error - the mixup seems to arise from the new meaning of this column forename, it expects the column resident_name now in the Person view
The text was updated successfully, but these errors were encountered: