mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #33952 -- Reallowed creating reverse foreign key managers on unsaved instances.
Thanks Claude Paroz for the report.
Regression in 7ba6ebe914.
This commit is contained in:
committed by
Mariusz Felisiak
parent
0701bb8e1f
commit
806e9e2d0d
@@ -758,6 +758,9 @@ class ManyToOneTests(TestCase):
|
||||
)
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
th.child_set.count()
|
||||
# The reverse foreign key manager can be created.
|
||||
self.assertEqual(th.child_set.model, Third)
|
||||
|
||||
th.save()
|
||||
# Now the model is saved, so we will need to execute a query.
|
||||
with self.assertNumQueries(1):
|
||||
|
||||
Reference in New Issue
Block a user