Merge branch 'bug/establishment-country' into 'develop'

fix country_id

See merge request gm/gm-backend!233
This commit is contained in:
Олег Хаятов 2020-01-22 16:55:50 +00:00
commit f5e60f0609

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