#34165: migrate management command does not respect database parameter when 
adding
Permissions.
------------------------------+------------------------------------
     Reporter:  Vasanth       |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  contrib.auth  |                  Version:  4.1
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Accepted
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

 Replying to [comment:8 David Wobrock]:
 > I think `bulk_create` already sets the `_state.db` to the value passed
 in `.using()`, right?

 Yes, but it's a different issue, strictly related with `Permission` and
 its `content_type`. `get_content_type()` is trying to find a content type
 using `obj._state.db` so when we create a `Permission()` without
 `._state.db` it will first try to find a content type in the default db.

 > So would it be relevant to close the issue or is the bug really related
 to Django itself?

 IMO we should fix this for permissions.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34165#comment:10>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018529e4da85-71521223-d335-46f3-86be-16a0ba2b873a-000000%40eu-central-1.amazonses.com.

Reply via email to