minint - seisin - fix nesting loop (#56194)

This commit is contained in:
gasparof 2021-08-16 17:20:34 +02:00 committed by Frédéric Péters
parent 4c3553cd1e
commit af40be21bf
1 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,8 @@ class ResourceView(DetailView):
attachmentData.attachmentType = value.get('content_type')
attachmentData.source = value['content']
break
else:
if not attachmentData.fileName:
for name, value in fields.items():
if isinstance(value, dict) and value.get('filename') and value.get('content'):
attachmentData.fileName = '"%s"' % value['filename']