diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py
old mode 100644
new mode 100755
index 61a903e..44b0928
a
|
b
|
class ImageFileDescriptor(FileDescriptor):
|
300 | 300 | assigning the width/height to the width_field/height_field, if appropriate. |
301 | 301 | """ |
302 | 302 | def __set__(self, instance, value): |
| 303 | update_dimensions = instance.__dict__.get(self.field.name) is None |
303 | 304 | super(ImageFileDescriptor, self).__set__(instance, value) |
304 | 305 | |
305 | 306 | # The rest of this method deals with width/height fields, so we can |
306 | | # bail early if neither is used. |
307 | | if not self.field.width_field and not self.field.height_field: |
| 307 | # bail early if neither is used or we don't have to update the |
| 308 | # dimensons because the data is coming from the database |
| 309 | if not (update_dimensions and (self.field.width_field or |
| 310 | self.field.height_field)): |
308 | 311 | return |
309 | 312 | |
310 | 313 | # We need to call the descriptor's __get__ to coerce this assigned |