fix country_id

This commit is contained in:
a.gorbunov 2020-01-22 13:53:28 +00:00
parent b12253fb6b
commit 24c352aeac

View File

@ -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):