#29706: RenameContentType._rename() doesn't save the content type on the correct
database
-------------------------------------+-------------------------------------
Reporter: Tyler Morgan | Owner: nobody
Type: Bug | Status: new
Component: | Version: master
contrib.contenttypes |
Severity: Normal | Resolution:
Keywords: RenameContentType | Triage Stage: Accepted
transaction atomic content_type |
update_fields using |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
Hebert, the solution proposed by Tyler on the PR looks appropriate to me.
The `using=db` kwarg has to be passed to `save()` for the same reason
explained in the SO page you linked to; `transaction.atomic(using)`
doesn't route any query and `save(using)` skips query routing.
--
Ticket URL: <https://code.djangoproject.com/ticket/29706#comment:4>
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/067.5bf632ab8f15ee8b2ccf1ae6fa685004%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.