Fix policies not triggering properly

This commit is contained in:
2023-02-09 20:28:34 +00:00
parent 7b6da7b704
commit 9519c1ac9f
4 changed files with 28 additions and 29 deletions

View File

@@ -73,7 +73,7 @@ class RuleClear(LoginRequiredMixin, PermissionRequiredMixin, APIView):
rule = NotificationRule.objects.get(pk=pk, user=request.user)
if isinstance(rule.match, dict):
for index in rule.match:
rule.match[index] = False
rule.match[index] = None
rule.save()
cleared_indices = ", ".join(rule.match)