diff --git a/cloudinary/models.py b/cloudinary/models.py index d24e3b65..f2436e32 100644 --- a/cloudinary/models.py +++ b/cloudinary/models.py @@ -59,7 +59,7 @@ def parse_cloudinary_resource(self, value): ) def from_db_value(self, value, expression, connection, context): - if value is None: + if not value: return value return self.parse_cloudinary_resource(value) @@ -68,7 +68,7 @@ def to_python(self, value): return value elif isinstance(value, UploadedFile): return value - elif value is None: + elif not value: return value else: return self.parse_cloudinary_resource(value)