0👍
I got this message because the the get_queryset()
method has been overridden in the model manager. This method is also called by update_or_create
.
def get_queryset(self):
return super().get_queryset().annotations()
After getting rid of it, everything worked fine again. .annotations()
was executing some group_by
clause. That’s why update_or_create
couldn’t proceed.
Source:stackexchange.com