forked from mirrors/bookwyrm
Fixes checking if image fields are already set
This commit is contained in:
parent
ad6c860951
commit
54cef421e2
1 changed files with 5 additions and 1 deletions
|
@ -398,7 +398,11 @@ class ImageField(ActivitypubFieldMixin, models.ImageField):
|
|||
if formatted is None or formatted is MISSING:
|
||||
return False
|
||||
|
||||
if not overwrite and hasattr(instance, self.name):
|
||||
if (
|
||||
not overwrite
|
||||
and hasattr(instance, self.name)
|
||||
and getattr(instance, self.name)
|
||||
):
|
||||
return False
|
||||
|
||||
getattr(instance, self.name).save(*formatted, save=save)
|
||||
|
|
Loading…
Reference in a new issue