diff --git a/apps/establishment/models.py b/apps/establishment/models.py index e3384dfb..dc596600 100644 --- a/apps/establishment/models.py +++ b/apps/establishment/models.py @@ -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, diff --git a/apps/establishment/tests.py b/apps/establishment/tests.py index a001b055..f80cb448 100644 --- a/apps/establishment/tests.py +++ b/apps/establishment/tests.py @@ -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(