fix: [message file] remove file link if the file is not downloaded
Some checks are pending
CI / ail_test (3.10) (push) Waiting to run
CI / ail_test (3.7) (push) Waiting to run
CI / ail_test (3.8) (push) Waiting to run
CI / ail_test (3.9) (push) Waiting to run

This commit is contained in:
terrtia 2025-01-28 14:15:40 +01:00
parent 9d41657ca8
commit 9802b04fa6
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -190,8 +190,9 @@ class Message(AbstractObject):
nb_files = 0 nb_files = 0
s_files = set() s_files = set()
for file_name in file_names: for file_name in file_names:
files[file_name] = []
for it in self.get_correlation_iter('file-name', '', file_name, 'item'): for it in self.get_correlation_iter('file-name', '', file_name, 'item'):
if file_name not in files:
files[file_name] = []
files[file_name].append(it[1:]) files[file_name].append(it[1:])
s_files.add(it[1:]) s_files.add(it[1:])
nb_files += 1 nb_files += 1