format condition

This commit is contained in:
a.gorbunov 2020-01-16 08:11:29 +00:00
parent 9ea7c25085
commit ca3d8a411c

View File

@ -30,6 +30,6 @@ class Command(BaseCommand):
establishment.preview_image_url = get_thumbnail(
file_=establishment.preview_image_url,
**sorl_settings,
format='PNG' if file_ext[1:] == 'png' else 'JPEG'
format='JPEG' if file_ext[1:] == 'jpg' else 'PNG'
).url
establishment.save()