misc: don't recurse in attachments proxy when deepcopying (#36515)

This commit is contained in:
Frédéric Péters 2019-11-13 14:27:19 +01:00
parent 0a68468493
commit 0e01b626b1
1 changed files with 2 additions and 0 deletions

View File

@ -155,6 +155,8 @@ class AttachmentsSubstitutionProxy(object):
self.formdata = formdata
def __getattr__(self, name):
if name.startswith('__'):
raise AttributeError(name)
for evo in self.formdata.evolution or []:
for part in evo.parts or []:
if getattr(part, 'varname', None) == name: