Fix test
Add todo to fix error
This commit is contained in:
parent
cabee12fab
commit
877d3d9e6a
|
|
@ -174,6 +174,9 @@ class EstablishmentQuerySet(models.QuerySet):
|
||||||
establishment_qs = Establishment.objects.filter(slug=establishment_slug)
|
establishment_qs = Establishment.objects.filter(slug=establishment_slug)
|
||||||
if establishment_qs.exists():
|
if establishment_qs.exists():
|
||||||
establishment = establishment_qs.first()
|
establishment = establishment_qs.first()
|
||||||
|
|
||||||
|
# TODO fix error:
|
||||||
|
# AttributeError: 'NoneType' object has no attribute 'coordinates'
|
||||||
return self.exclude(slug=establishment_slug) \
|
return self.exclude(slug=establishment_slug) \
|
||||||
.filter(is_publish=True,
|
.filter(is_publish=True,
|
||||||
image_url__isnull=False,
|
image_url__isnull=False,
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ class EstablishmentWebFavoriteTests(ChildTestCase):
|
||||||
|
|
||||||
response = self.client.post(f'/api/web/establishments/slug/{self.establishment.slug}/favorites/',
|
response = self.client.post(f'/api/web/establishments/slug/{self.establishment.slug}/favorites/',
|
||||||
data=data)
|
data=data)
|
||||||
print(f"================================RESPONSE: {response.json()}")
|
|
||||||
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
|
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
|
||||||
|
|
||||||
response = self.client.delete(
|
response = self.client.delete(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user