diff --git a/src/collective/exportimport/serializer.py b/src/collective/exportimport/serializer.py index eff23154..2530d426 100644 --- a/src/collective/exportimport/serializer.py +++ b/src/collective/exportimport/serializer.py @@ -90,10 +90,12 @@ def __call__(self): return None try: - if "built-in function id" in namedfile.filename: + if namedfile.filename and "built-in function id" in namedfile.filename: filename = self.context.id else: filename = namedfile.filename + if not filename: + filename = self.context.id except AttributeError: # Try to recover broken namedfile # Related to: WARNING OFS.Uninstalled Could not import class 'NamedBlobFile' from module 'zope.app.file.file'