implement 3664

This commit is contained in:
kobayashi
2019-12-11 04:48:50 -05:00
parent 0d8fd45587
commit 5710f297f1
10 changed files with 77 additions and 3 deletions

View File

@@ -39,6 +39,8 @@ class ConfigContextQuerySet(QuerySet):
else:
regions = []
tags = obj.tags.slugs()
return self.filter(
Q(regions__in=regions) | Q(regions=None),
Q(sites=obj.site) | Q(sites=None),
@@ -46,5 +48,6 @@ class ConfigContextQuerySet(QuerySet):
Q(platforms=obj.platform) | Q(platforms=None),
Q(tenant_groups=tenant_group) | Q(tenant_groups=None),
Q(tenants=obj.tenant) | Q(tenants=None),
Q(tags__name__in=tags) | Q(tags=None),
is_active=True,
).order_by('weight', 'name')