Now Raise an exception if subclasses are missing at querytime.
Beats returning None thanks to #aid for mentioning it on IRC
This commit is contained in:
parent
dd49d1d4bb
commit
1631788ab6
3 changed files with 34 additions and 6 deletions
|
|
@ -1062,6 +1062,7 @@ class FieldTest(unittest.TestCase):
|
|||
Post.drop_collection()
|
||||
User.drop_collection()
|
||||
|
||||
|
||||
def test_generic_reference_document_not_registered(self):
|
||||
"""Ensure dereferencing out of the document registry throws a
|
||||
`NotRegistered` error.
|
||||
|
|
@ -1445,7 +1446,7 @@ class FieldTest(unittest.TestCase):
|
|||
a.save()
|
||||
|
||||
self.assertEqual(a.counter, 2)
|
||||
|
||||
|
||||
a = Animal.objects.first()
|
||||
self.assertEqual(a.counter, 2)
|
||||
a.reload()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue