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 running the makemessages command and the model has the customModelManager Defined, it's giving an error message saying Field cannot be both deferred and traversed using select_related at the same time. I checked the code and it calls the .only method on the ModelManager. I looked at the django documentation for the .only method (Using only() and omitting a field requested using select_related() is an error as well and found out it fails with the select_related method.
This is what the docs says
Using only() and omitting a field requested using select_related() is an error as well.
This is my customer ModelManager Looks like.
class CustomManager(models.Manager):
def get_queryset(self):
return CustomManager(self.model).select_related('field')
The text was updated successfully, but these errors were encountered:
When running the makemessages command and the model has the customModelManager Defined, it's giving an error message saying
Field cannot be both deferred and traversed using
select_relatedat the same time.
I checked the code and it calls the.only
method on the ModelManager. I looked at the django documentation for the.only
method (Using only() and omitting a field requested using select_related() is an error as well and found out it fails with the select_related method.This is what the docs says
This is my customer ModelManager Looks like.
The text was updated successfully, but these errors were encountered: