From 24c352aeac7c71c3452b19e3bf5d9c78c5cb99df Mon Sep 17 00:00:00 2001 From: "a.gorbunov" Date: Wed, 22 Jan 2020 13:53:28 +0000 Subject: [PATCH] fix country_id --- apps/establishment/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/establishment/models.py b/apps/establishment/models.py index 7f20c529..e4b59ebe 100644 --- a/apps/establishment/models.py +++ b/apps/establishment/models.py @@ -764,7 +764,7 @@ class Establishment(GalleryMixin, ProjectBaseMixin, URLImageMixin, """ Return Country id of establishment location """ - return self.address.country_id + return self.address.country_id if hasattr(self.address, 'country_id') else None @property def establishment_id(self):