policy(minor): lookup correct policy subclass
This commit is contained in:
parent
de0b137b1e
commit
920e705d75
|
@ -58,6 +58,9 @@ class PolicyEngine:
|
||||||
LOGGER.debug("Taking result from cache for %s", policy.pk.hex)
|
LOGGER.debug("Taking result from cache for %s", policy.pk.hex)
|
||||||
cached_policies.append(cached_policy)
|
cached_policies.append(cached_policy)
|
||||||
else:
|
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)
|
LOGGER.debug("Evaluating policy %s", policy.pk.hex)
|
||||||
our_end, task_end = Pipe(False)
|
our_end, task_end = Pipe(False)
|
||||||
task = PolicyTask()
|
task = PolicyTask()
|
||||||
|
|
Reference in New Issue