#31021: 0011_update_proxy_permissions crashes in multi database environment.
---------------------------------+------------------------------------
Reporter: haudoing | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 2.2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by felixxm):
* status: closed => new
* resolution: needsinfo =>
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Many thanks! I was able to reproduce this issue, fix is quite simple:
{{{
diff --git
a/django/contrib/auth/migrations/0011_update_proxy_permissions.py
b/django/contrib/auth/migrations/0011_update_proxy_permissions.py
index c3f617f438..62e0a91737 100644
--- a/django/contrib/auth/migrations/0011_update_proxy_permissions.py
+++ b/django/contrib/auth/migrations/0011_update_proxy_permissions.py
@@ -39,7 +39,7 @@ def update_proxy_model_permissions(apps, schema_editor,
reverse=False):
old_content_type = proxy_content_type if reverse else
concrete_content_type
new_content_type = concrete_content_type if reverse else
proxy_content_type
try:
- with transaction.atomic():
+ with
transaction.atomic(using=schema_editor.connection.alias):
Permission.objects.filter(
permissions_query,
content_type=old_content_type,
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31021#comment:13>
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/066.55a1188f6749cd38249842f4f5d07d0b%40djangoproject.com.