mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +00:00
changes in article update api and get image url method
This commit is contained in:
@ -16,7 +16,9 @@ def pop_id(data):
|
||||
|
||||
|
||||
def get_image_url(data):
|
||||
if 'image' in data and data['image'] is not None:
|
||||
if 'image_url' in data:
|
||||
return data['image_url']
|
||||
elif 'image' in data and data['image'] is not None:
|
||||
image = data.pop('image')
|
||||
filename = f"{ARTICLE_CARD_IMAGE_FOLDER}/{image.name}"
|
||||
# upload image on ali baba
|
||||
|
||||
Reference in New Issue
Block a user