Made F deconstruction omit 'expressions' in the path.
This commit is contained in:
parent
8806e8809e
commit
45f48ed4f7
|
@ -578,7 +578,7 @@ class TemporalSubtraction(CombinedExpression):
|
||||||
return connection.ops.subtract_temporals(self.lhs.output_field.get_internal_type(), lhs, rhs)
|
return connection.ops.subtract_temporals(self.lhs.output_field.get_internal_type(), lhs, rhs)
|
||||||
|
|
||||||
|
|
||||||
@deconstructible
|
@deconstructible(path='django.db.models.F')
|
||||||
class F(Combinable):
|
class F(Combinable):
|
||||||
"""An object capable of resolving references to existing query objects."""
|
"""An object capable of resolving references to existing query objects."""
|
||||||
|
|
||||||
|
|
|
@ -991,7 +991,7 @@ class FTests(SimpleTestCase):
|
||||||
def test_deconstruct(self):
|
def test_deconstruct(self):
|
||||||
f = F('name')
|
f = F('name')
|
||||||
path, args, kwargs = f.deconstruct()
|
path, args, kwargs = f.deconstruct()
|
||||||
self.assertEqual(path, 'django.db.models.expressions.F')
|
self.assertEqual(path, 'django.db.models.F')
|
||||||
self.assertEqual(args, (f.name,))
|
self.assertEqual(args, (f.name,))
|
||||||
self.assertEqual(kwargs, {})
|
self.assertEqual(kwargs, {})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue