diff options
Diffstat (limited to 'tests/update/tests.py')
| -rw-r--r-- | tests/update/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/update/tests.py b/tests/update/tests.py index 15a657fab0..0c3a399514 100644 --- a/tests/update/tests.py +++ b/tests/update/tests.py @@ -225,6 +225,13 @@ class AdvancedTests(TestCase): new_name=annotation, ).update(name=F("new_name")) + def test_update_ordered_by_inline_m2m_annotation(self): + foo = Foo.objects.create(target="test") + Bar.objects.create(foo=foo) + + Bar.objects.order_by(Abs("m2m_foo")).update(x=2) + self.assertEqual(Bar.objects.get().x, 2) + @unittest.skipUnless( connection.vendor == "mysql", |
