In attachment name, renplace special characters like '\n' or '\s'.

Task #048600
This commit is contained in:
Juanjo Garcia 2022-05-30 13:07:31 +02:00
parent bf9fac11ba
commit 5263abad10
1 changed files with 2 additions and 0 deletions

View File

@ -368,6 +368,8 @@ class Activity(metaclass=PoolMeta):
to_save = []
for activity, attachments in zip(activities, activity_attachments):
for attachment in attachments:
attachment.name = attachment.name.replace(
'\n','').replace('\r', '')
attachment.resource = str(activity)
to_save += attachments
Attachment.save(to_save)