From 37fa64f63dc0947e7c02f53f6a1c1fdc8b4ec429 Mon Sep 17 00:00:00 2001 From: Walter Lorenzetti Date: Wed, 18 Oct 2023 11:16:24 +0200 Subject: [PATCH] Fix anonymous user subset filter. (#625) Co-authored-by: wlorenzetti --- g3w-admin/qdjango/models/constraints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g3w-admin/qdjango/models/constraints.py b/g3w-admin/qdjango/models/constraints.py index fc0cafa66..615dbb0e0 100644 --- a/g3w-admin/qdjango/models/constraints.py +++ b/g3w-admin/qdjango/models/constraints.py @@ -240,7 +240,7 @@ def get_constraints_for_anonymoususer(cls, layer_id, context='v'): if not constraints: return [] - return cls.objects.filter(anonymoususer=True) + return cls.objects.filter(anonymoususer=True, constraint__in=constraints) @classmethod def get_rule_definition_for_user(cls, user, layer_id, context='v'):