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
When I use a string Projection and try to filter on a field my view should have, I get this error FieldError: cannot resolve keyword 'x' into field. Choices are: id.
After a quick investigation in the ViewMeta, it seems the fields from my real model are not being copied immediately and are put in a deferred situation because they are strings. The thing is, as they are deferred, the super new is called without them being attributed and that apparently causes django to miss them. I then only get one field on my view in the end, which is id.
As the issue was with the projection being a string, I tried putting projection = MyModel._meta.fields but got an error with reverse name clashes on the foreign keys.
Do you have any solution for this problem ?
I don't want to specify every field on my view especially since they are the same.
The text was updated successfully, but these errors were encountered:
I no longer work for Pebble and, as far as I know, Pebble are no longer maintaining this project. I'd recommend having a look at forks from this project that may be able to better support you.
When I use a string Projection and try to filter on a field my view should have, I get this error
FieldError: cannot resolve keyword 'x' into field. Choices are: id
.After a quick investigation in the ViewMeta, it seems the fields from my real model are not being copied immediately and are put in a deferred situation because they are strings. The thing is, as they are deferred, the super new is called without them being attributed and that apparently causes django to miss them. I then only get one field on my view in the end, which is id.
As the issue was with the projection being a string, I tried putting
projection = MyModel._meta.fields
but got an error with reverse name clashes on the foreign keys.Do you have any solution for this problem ?
I don't want to specify every field on my view especially since they are the same.
The text was updated successfully, but these errors were encountered: