This commit is contained in:
Aron Podrigal 2015-06-24 13:15:47 +00:00
commit 912bb78cfc

View File

@ -1198,7 +1198,7 @@ class FileField(Field):
return data
def to_representation(self, value):
if self.use_url:
if self.use_url and hasattr(value, 'url'):
if not value:
return None
url = value.url