diff --git a/apps/establishment/models.py b/apps/establishment/models.py index 68b8872e..8f315fff 100644 --- a/apps/establishment/models.py +++ b/apps/establishment/models.py @@ -1,12 +1,14 @@ """Establishment models.""" from functools import reduce + +from django.contrib.contenttypes import fields as generic from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import gettext_lazy as _ + from location.models import Address from utils.models import (ProjectBaseMixin, ImageMixin, TJSONField, TraslatedFieldsMixin, BaseAttributes) -from django.contrib.contenttypes import fields as generic # todo: establishment type&subtypes check @@ -100,6 +102,7 @@ class Establishment(ProjectBaseMixin, ImageMixin, TraslatedFieldsMixin): verbose_name=_('Price level')) awards = generic.GenericRelation(to='main.Award') tags = generic.GenericRelation(to='main.MetaDataContent') + reviews = generic.GenericRelation(to='review.Review') objects = EstablishmentQuerySet.as_manager()