diff options
| author | Tim Graham <timograham@gmail.com> | 2017-05-03 10:39:54 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-05-03 12:31:18 -0400 |
| commit | f3217ab59696ea095a42c7fb4d98f21bb000ca8e (patch) | |
| tree | fc6771feef31818ec3fed01bed5e88361a47335c /tests | |
| parent | 008ba77dfd23576a8080f05e3c45a19da73b20ba (diff) | |
[1.11.x] Fixed #28166 -- Fixed Model._state.db on MTI parent model after saving child model.
Regression in 38575b007a722d6af510ea46d46393a4cda9ca29.
Backport of 584e10c76edcd3a33765a52c5cde0096a3ce7dbc from master
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/model_inheritance_regress/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/model_inheritance_regress/tests.py b/tests/model_inheritance_regress/tests.py index 3664fca44f..e51dfca9dc 100644 --- a/tests/model_inheritance_regress/tests.py +++ b/tests/model_inheritance_regress/tests.py @@ -474,6 +474,10 @@ class ModelInheritanceTest(TestCase): jane = Supplier.objects.order_by("name").select_related("restaurant")[0] self.assertEqual(jane.restaurant.name, "Craft") + def test_ptr_accessor_assigns_db(self): + r = Restaurant.objects.create() + self.assertEqual(r.place_ptr._state.db, 'default') + def test_related_filtering_query_efficiency_ticket_15844(self): r = Restaurant.objects.create( name="Guido's House of Pasta", |
