-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Fixed #10827 -- Ensured ContentTypes are created before permission creation #10001
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it break anything if this is moved to the top? I would assume this module can safely depend on the latter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the approach @claudep and it's always great to fix such a long standing bug.
tests/auth_tests/test_management.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be great to assert the permission and content types were appropriately created as well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was bitten by this today, and thought it is enough time lost by fellow developers!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should eventually warn/error (ImproperlyConfigured
) when auth
is installed before contenttypes
instead to prevent unnecessary double work instead but this could be tackled and discussed somewhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On thing to keep in mind is that this is going to be introducing double work.
Sure, this reminds us about the wider discussion of INSTALLED_APPS ordering. I agree on discussing this elsewhere, because this bug has waited for too long now. |
https://code.djangoproject.com/ticket/10827