#23422: Cannot add Permission to Group in data migration
----------------------------+--------------------------------------
Reporter: tjwalch | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by andrewgodwin):
* status: new => closed
* resolution: => wontfix
Comment:
This is a limitation of the signalling system we use to create
ContentTypes; if we fixed this to work, there would then be issues where
the ContentTypes were created too early.
I would suggest that the data migration uses
ContentType.objects.get_for_model to get the ContentType before making the
Permission, as this creates the ContentType if necessary and has internal
caching too.
--
Ticket URL: <https://code.djangoproject.com/ticket/23422#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.8e63c4aced498ab2e7284b7b4e065397%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.