Add todo to fix error
This commit is contained in:
littlewolf 2019-09-25 19:44:33 +03:00
parent cabee12fab
commit 877d3d9e6a
2 changed files with 4 additions and 1 deletions

View File

@ -174,6 +174,9 @@ class EstablishmentQuerySet(models.QuerySet):
establishment_qs = Establishment.objects.filter(slug=establishment_slug)
if establishment_qs.exists():
establishment = establishment_qs.first()
# TODO fix error:
# AttributeError: 'NoneType' object has no attribute 'coordinates'
return self.exclude(slug=establishment_slug) \
.filter(is_publish=True,
image_url__isnull=False,

View File

@ -343,7 +343,7 @@ class EstablishmentWebFavoriteTests(ChildTestCase):
response = self.client.post(f'/api/web/establishments/slug/{self.establishment.slug}/favorites/',
data=data)
print(f"================================RESPONSE: {response.json()}")
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
response = self.client.delete(