try to fix issue w/ news images optimization

This commit is contained in:
Kuroshini 2020-01-20 14:18:56 +03:00
parent 92f349d8e7
commit 9ce5f89d74

View File

@ -28,6 +28,7 @@ class Command(BaseCommand):
def optimize(self, text, max_size, max_quality):
"""optimize news images"""
if isinstance(text, str):
for image in get_url_images_in_text(text):
try:
size, width, height = get_image_meta_by_url(image)