polices: add helper to remove None-value keys from dict for policies

This commit is contained in:
Jens Langhammer
2020-07-08 23:03:58 +02:00
parent d786fa4b7c
commit e58ac7ae90
5 changed files with 25 additions and 7 deletions

View File

@ -15,6 +15,7 @@ from passbook.flows.planner import (
)
from passbook.flows.views import SESSION_KEY_PLAN
from passbook.lib.utils.urls import redirect_with_qs
from passbook.policies.utils import delete_none_keys
from passbook.providers.saml.utils.encoding import decode_base64_and_inflate
from passbook.sources.saml.exceptions import (
MissingSAMLResponse,
@ -153,7 +154,7 @@ class Processor:
return self._flow_response(
request,
self._source.enrollment_flow,
**{PLAN_CONTEXT_PROMPT: name_id_filter},
**{PLAN_CONTEXT_PROMPT: delete_none_keys(name_id_filter)},
)
def _flow_response(