Ticket #13750: 13750_simple_approach_solution.diff

File 13750_simple_approach_solution.diff, 514 bytes (added by Aksel, 4 years ago)

Simple approach to solve #13750

  • django/db/models/fields/files.py

    diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py
    index ba79e92..2ed5b3e 100644
    a b class FileDescriptor(object): 
    220220            file.field = self.field
    221221            file.storage = self.field.storage
    222222
     223        if isinstance(file, ImageFieldFile) and hasattr(file, 'field'):
     224            file.open()
     225
    223226        # That was fun, wasn't it?
    224227        return instance.__dict__[self.field.name]
    225228
Back to Top