diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py
index 3d1291a..edc5566 100644
a
|
b
|
class FileDescriptor(DeferredAttribute):
|
180 | 180 | # in __set__. |
181 | 181 | file = super().__get__(instance, cls) |
182 | 182 | |
183 | | # If this value is a string (instance.file = "path/to/file") or None |
| 183 | # If this value is a string (instance.file = "path/to/file") |
184 | 184 | # then we simply wrap it with the appropriate attribute class according |
185 | 185 | # to the file field. [This is FieldFile for FileFields and |
186 | 186 | # ImageFieldFile for ImageFields; it's also conceivable that user |
187 | 187 | # subclasses might also want to subclass the attribute class]. This |
188 | 188 | # object understands how to convert a path to a file, and also how to |
189 | 189 | # handle None. |
190 | | if isinstance(file, str) or file is None: |
| 190 | if isinstance(file, str): |
191 | 191 | attr = self.field.attr_class(instance, self.field, file) |
192 | 192 | instance.__dict__[self.field.attname] = attr |
193 | 193 | |