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
This means if a custom manager is used, without using the extremely generic "objects" the whole thing does not work.
Suggested Fix
The real problem is in utils.replace_pk.
The fix is to replace model.objects with model._meta.default_manager. This is how I believe Django does things internally when a manager is not specified.
The text was updated successfully, but these errors were encountered:
This means if a custom manager is used, without using the extremely generic "objects" the whole thing does not work.
Suggested Fix
The real problem is in
utils.replace_pk
.The fix is to replace
model.objects
withmodel._meta.default_manager
. This is how I believe Django does things internally when a manager is not specified.The text was updated successfully, but these errors were encountered: