added merge migration

This commit is contained in:
a.feteleu 2019-11-19 17:38:53 +03:00
parent 484a9a3250
commit 0b1b89b6ba

View File

@ -21,10 +21,10 @@ class Command(BaseCommand):
image_url = establishment.image_url.rstrip()
relative_image_path = image_url[len(cdn_prefix):]
response = requests.head(image_url, allow_redirects=True)
if response.status_code != status.HTTP_200_OK:
not_valid_link_counter += 1
not_valid_urls.append(image_url)
#response = requests.head(image_url, allow_redirects=True)
#if response.status_code != status.HTTP_200_OK:
# not_valid_link_counter += 1
# not_valid_urls.append(image_url)
image, image_created = Image.objects.get_or_create(
orientation=Image.HORIZONTAL,