policies: fix display of policy result source

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-04 14:04:41 +02:00
parent 5b5d7e4997
commit 37a14858ad
6 changed files with 61 additions and 50 deletions

View File

@ -149,6 +149,7 @@ class PolicyEngine:
if self.mode == PolicyEngineMode.MODE_ANY:
passing = any(x.passing for x in all_results)
result = PolicyResult(passing)
result.source_results = all_results
result.messages = tuple(y for x in all_results for y in x.messages)
return result