mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #26900 -- Fixed crash accessing deferred FileFields.
This commit is contained in:
parent
255fb99284
commit
7c33aa8a87
3 changed files with 19 additions and 3 deletions
|
|
@ -50,3 +50,7 @@ class FileFieldTests(TestCase):
|
|||
d = Document.objects.create(myfile='something.txt')
|
||||
d.refresh_from_db()
|
||||
self.assertIs(d.myfile.instance, d)
|
||||
|
||||
def test_defer(self):
|
||||
Document.objects.create(myfile='something.txt')
|
||||
self.assertEqual(Document.objects.defer('myfile')[0].myfile, 'something.txt')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue