From 37fb67cbb33b4179cff019236ff0aa70f710943c Mon Sep 17 00:00:00 2001 From: Kuroshini Date: Wed, 16 Oct 2019 14:11:07 +0300 Subject: [PATCH] Fix subqueries --- apps/main/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/main/models.py b/apps/main/models.py index 6af4e4d8..129ea238 100644 --- a/apps/main/models.py +++ b/apps/main/models.py @@ -173,7 +173,8 @@ class SiteSettings(ProjectBaseMixin): @property def published_sitefeatures(self): return self.sitefeature_set\ - .filter(Q(published=True) and Q(feature__source__in=[PlatformMixin.WEB, PlatformMixin.ALL])) + .filter(published=True)\ + .filter(feature__source__in=[PlatformMixin.WEB, PlatformMixin.ALL]) @property def site_url(self):