-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Objects' default manager should be used rathern than "model.objects" #175
Comments
Will you have some time in the next couple weeks to implement a PR? |
Yup, will try. |
Created pull request :) |
Any chance this would get merged? The PR is simple enough and should be non-controversial. Thank you! |
I think it would be better to use Any update on this? looks like #176 is waiting on changes. It would be really helpful if the fix was merged. |
Easy audit signal handlers assume that all model instances are reachable via Model.objects.get(). This might not be the case when model manager for "objects" is redefined (e.g. for something like
SoftDeletableManager
indjango-model-utils
. If that's the case, easy audit signal handling can fail with DoesNotExist when trying to get old value, e.g. here:I think it could be worker around by using models'
_default_manager
, as described at https://docs.djangoproject.com/en/3.1/topics/db/managers/#django.db.models.Model._default_managerThe text was updated successfully, but these errors were encountered: