mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Renamed Field.rel attribute to remote_field
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
This commit is contained in:
committed by
Tim Graham
parent
f9c70bb3a1
commit
8f30556329
@@ -153,7 +153,7 @@ class DeletionTests(TestCase):
|
||||
r = R.objects.create()
|
||||
m.m2m.add(r)
|
||||
r.delete()
|
||||
through = M._meta.get_field('m2m').rel.through
|
||||
through = M._meta.get_field('m2m').remote_field.through
|
||||
self.assertFalse(through.objects.exists())
|
||||
|
||||
r = R.objects.create()
|
||||
|
||||
Reference in New Issue
Block a user