diff --git a/passbook/admin/templates/administration/policy/list.html b/passbook/admin/templates/administration/policy/list.html index bcbd15e50..98fc3f4cf 100644 --- a/passbook/admin/templates/administration/policy/list.html +++ b/passbook/admin/templates/administration/policy/list.html @@ -55,7 +55,7 @@
{{ policy.name }}
- {% if not policy.bindings.exists %} + {% if not policy.bindings.exists and not policy.promptstage_set.exists %} {% trans 'Warning: Policy is not assigned.' %} {% else %} diff --git a/passbook/admin/views/overview.py b/passbook/admin/views/overview.py index 693e4e744..3092e9320 100644 --- a/passbook/admin/views/overview.py +++ b/passbook/admin/views/overview.py @@ -58,7 +58,7 @@ class AdministrationOverviewView(AdminRequiredMixin, TemplateView): application=None ) kwargs["policies_without_binding"] = len( - Policy.objects.filter(bindings__isnull=True) + Policy.objects.filter(bindings__isnull=True, promptstage__isnull=True) ) kwargs["cached_policies"] = len(cache.keys("policy_*")) kwargs["cached_flows"] = len(cache.keys("flow_*"))