Automatically handle image fields in model serializer

This commit is contained in:
Mouse Reeve
2020-11-27 18:26:07 -08:00
parent 4ae785a7f7
commit 2480690378
4 changed files with 11 additions and 25 deletions

View File

@ -139,7 +139,7 @@ class ActivityObject:
for (model_key, value) in image_fields.items():
if not value:
continue
#formatted_value = image_formatter(value)
formatted_value = image_formatter(value)
getattr(instance, model_key).save(*value, save=True)
# add one to many fields