Skip to content

Commit

Permalink
models:file - set action to manual with reason if reidentify fails
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Nov 8, 2023
1 parent 61202e5 commit 3350c07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion acacore/models/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 3350c07

Please sign in to comment.