From 920e705d756897a76e6f952f590b99aef94b20aa Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 2 Oct 2019 22:28:58 +0200 Subject: [PATCH] policy(minor): lookup correct policy subclass --- passbook/policy/engine.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passbook/policy/engine.py b/passbook/policy/engine.py index 92a749c50..444c33a09 100644 --- a/passbook/policy/engine.py +++ b/passbook/policy/engine.py @@ -58,6 +58,9 @@ class PolicyEngine: LOGGER.debug("Taking result from cache for %s", policy.pk.hex) cached_policies.append(cached_policy) else: + LOGGER.debug("Looking up real class of policy...") + # TODO: Rewrite this to lookup all policies at once + policy = Policy.objects.get_subclass(pk=policy.id) LOGGER.debug("Evaluating policy %s", policy.pk.hex) our_end, task_end = Pipe(False) task = PolicyTask()