Automatically handle image fields in model serializer
This commit is contained in:
parent
4ae785a7f7
commit
2480690378
4 changed files with 11 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue