From 6d4ff76ae50bc2a72d0dad37f2d79f8dfcc1ac0f Mon Sep 17 00:00:00 2001 From: Alexander Burdeiny Date: Wed, 13 Apr 2016 16:52:35 +0300 Subject: [PATCH] =?UTF-8?q?1203=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B2=D1=8B=D0=B7=D1=8B=D0=B2=D0=B0=D1=8E=D1=89?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/model_mixin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/model_mixin.py b/functions/model_mixin.py index 62c692f7..6655eb24 100644 --- a/functions/model_mixin.py +++ b/functions/model_mixin.py @@ -89,13 +89,13 @@ class EventMixin(object): return list(Service.objects.language().filter(url__in=ids).order_by('sort')) - def get_services_detail(self, exluded, _type): + def get_services_detail(self, excluded, _type): if not isinstance(getattr(self, '_get_services_detail', None), list): # excluded = ['visit', 'tickets'] country_ids = [item for item, bool in self.country.services if bool==True] ids = [item for item, bool in self.services if bool==True] qs = Service.objects.language() - if exluded is not None: + if excluded is not None: qs = qs.exclude(url__in=excluded) qs = qs.filter(Q(Q(url__in=country_ids) & Q(type=_type)) | Q(url__in=ids)) self._get_services_detail = list(qs)