added temporary potential bug (change auto_crop_images dict names for News)

This commit is contained in:
Anatoly 2019-11-17 21:52:07 +03:00
parent 62c4ab8d74
commit 0d2f961ad5

View File

@ -268,7 +268,7 @@ class News(GalleryModelMixin, BaseAttributes, TranslatedFieldsMixin):
}
for crop in crop_parameters:
d['auto_crop_images'].update(
{crop[len(f'{model_name}_'):]: image.get_image_url(crop)})
{f'{crop[len(f"{model_name}_"):]}_url': image.get_image_url(crop)})
gallery.append(d)
return gallery
@ -288,7 +288,7 @@ class News(GalleryModelMixin, BaseAttributes, TranslatedFieldsMixin):
if p.startswith(self._meta.model_name.lower())]
for crop in crop_parameters:
image_property['auto_crop_images'].update(
{crop[len(f'{model_name}_'):]: image.get_image_url(crop)})
{f'{crop[len(f"{model_name}_"):]}_url': image.get_image_url(crop)})
return image_property