From f8ad1ee92143c85cc6aa7fdb00c056ed611aaeb6 Mon Sep 17 00:00:00 2001 From: frimpongopoku Date: Thu, 28 Sep 2023 23:37:24 +0400 Subject: [PATCH] vendor will now save copyright dets updates --- src/api/store/vendor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/api/store/vendor.py b/src/api/store/vendor.py index b63c7b649..7eb009e6a 100644 --- a/src/api/store/vendor.py +++ b/src/api/store/vendor.py @@ -1,6 +1,6 @@ from _main_.utils.footage.FootageConstants import FootageConstants from _main_.utils.footage.spy import Spy -from api.store.common import make_media_info +from api.store.common import get_media_info, make_media_info from api.tests.common import RESET, makeUserUpload from api.utils.filter_functions import get_vendor_filter_params from database.models import Vendor, UserProfile, Media, Community @@ -191,6 +191,12 @@ def update_vendor(self, context: Context, args, user_submitted) -> Tuple[dict, M else: media = Media.objects.filter(id = image[0]).first() vendor.logo = media + + if vendor.image: + old_image_info, can_save_info = get_media_info(vendor.logo) + if can_save_info: + vendor.image.user_upload.info.update({**old_image_info,**image_info}) + vendor.image.user_upload.save() if onboarding_contact_email: