diff --git a/apps/establishment/models.py b/apps/establishment/models.py index 2ca28311..1e471ab9 100644 --- a/apps/establishment/models.py +++ b/apps/establishment/models.py @@ -523,7 +523,7 @@ class EstablishmentQuerySet(models.QuerySet): """Return QuerySet with establishments that user has an access.""" from account.models import UserRole - if not user.is_staff: + if not user.is_superuser: filters = {'address__city__country__code': country_code} if user.is_establishment_administrator and not user.is_establishment_manager: filters.update({ diff --git a/apps/news/models.py b/apps/news/models.py index dc7f8898..963d8228 100644 --- a/apps/news/models.py +++ b/apps/news/models.py @@ -246,7 +246,7 @@ class NewsQuerySet(TranslationQuerysetMixin): def available_news(self, user, country_code: str): """Return QuerySet with news that user has an access.""" - return self.filter(site__country__code=country_code) if not user.is_staff else self + return self.filter(site__country__code=country_code) if not user.is_superuser else self class News(GalleryMixin, BaseAttributes, TranslatedFieldsMixin, HasTagsMixin, diff --git a/apps/product/models.py b/apps/product/models.py index 851bc138..f7332f65 100644 --- a/apps/product/models.py +++ b/apps/product/models.py @@ -231,7 +231,7 @@ class ProductQuerySet(models.QuerySet): """Return QuerySet with products that user has an access.""" from account.models import UserRole - if not user.is_staff: + if not user.is_superuser: filters = {'establishment__address__city__country__code': country_code} if user.is_establishment_administrator and not user.is_establishment_manager: filters.update({