summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2019-03-09 13:59:55 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-06-06 12:09:01 +0200
commit661e6cc2c97d9bcb45198be787409488e1825c90 (patch)
tree5f4c07e39674cc1600601a2898dc766c8ea894e6 /django
parent4b45b6c8e4d7c9701a332e80d3b1c84209dc36e2 (diff)
Fixed #29706 -- Made RenameContentType._rename() save to the correct database.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/contenttypes/management/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/contenttypes/management/__init__.py b/django/contrib/contenttypes/management/__init__.py
index 2b5f688136..563cba2fdf 100644
--- a/django/contrib/contenttypes/management/__init__.py
+++ b/django/contrib/contenttypes/management/__init__.py
@@ -24,7 +24,7 @@ class RenameContentType(migrations.RunPython):
content_type.model = new_model
try:
with transaction.atomic(using=db):
- content_type.save(update_fields={'model'})
+ content_type.save(using=db, update_fields={'model'})
except IntegrityError:
# Gracefully fallback if a stale content type causes a
# conflict as remove_stale_contenttypes will take care of