Automatically handle image fields in model serializer
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user