diff options
author | Tim Graham <timograham@gmail.com> | 2015-10-08 17:17:10 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-10-27 07:57:15 -0400 |
commit | 9c5e272860c076736237d4b280c7c922c46ba273 (patch) | |
tree | 69727482a17b9bf2594c0755ee9f00f5f361cea0 /tests/update_only_fields | |
parent | 0b5d32facaa1badc0553934f6935507070cfea1b (diff) | |
download | django-9c5e272860c076736237d4b280c7c922c46ba273.tar.gz |
Fixed #25550 -- Deprecated direct assignment to the reverse side of a related set.
Diffstat (limited to 'tests/update_only_fields')
-rw-r--r-- | tests/update_only_fields/tests.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/update_only_fields/tests.py b/tests/update_only_fields/tests.py index 34519cce4c..c2ff8e1089 100644 --- a/tests/update_only_fields/tests.py +++ b/tests/update_only_fields/tests.py @@ -124,11 +124,9 @@ class UpdateOnlyFieldsTests(TestCase): profile_boss = Profile.objects.create(name='Boss', salary=3000) e1 = Employee.objects.create(name='Sara', gender='F', employee_num=1, profile=profile_boss) - a1 = Account.objects.create(num=1) a2 = Account.objects.create(num=2) - - e1.accounts = [a1, a2] + e1.accounts.set([a1, a2]) with self.assertRaises(ValueError): e1.save(update_fields=['accounts']) |