Merge branch 'bug/establishment_optimize' into 'develop'

format condition

See merge request gm/gm-backend!216
This commit is contained in:
Anton Gorbunov 2020-01-16 08:11:48 +00:00
commit de3933aa88

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()