From 18061782905e07710679d60f1c93b7b802a7bb91 Mon Sep 17 00:00:00 2001 From: Paul Roeland Date: Tue, 20 Aug 2024 13:16:10 +0200 Subject: [PATCH] fix for exporting from Castle sites, found at Beethovensprint2024 --- src/collective/exportimport/serializer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'