From 3350c07a9ee1bfa6d12df600fcfcde96a79ac59a Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Wed, 8 Nov 2023 13:51:58 +0100 Subject: [PATCH] models:file - set action to manual with reason if reidentify fails --- acacore/models/file.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acacore/models/file.py b/acacore/models/file.py index ac2e894..ff3152d 100644 --- a/acacore/models/file.py +++ b/acacore/models/file.py @@ -19,6 +19,7 @@ from .reference_files import Action from .reference_files import ActionData from .reference_files import CustomSignature +from .reference_files import ManualAction from .reference_files import TActionType @@ -123,7 +124,8 @@ def from_file( elif file.action_data.reidentify and file.action_data.reidentify.onfail: file.action = file.action_data.reidentify.onfail else: - file.get_action({}) + file.action = "manual" + file.action_data = ActionData(manual=ManualAction(reason="Re-identify failure")) file.puid = file.signature = file.warning = None if file.action_data and file.action_data.ignore and file.action_data.ignore.ignore_if: