Skip to content

Commit

Permalink
Merge pull request #248 from collective/fix-filename-empty
Browse files Browse the repository at this point in the history
fix for exporting from Castle sites, found at Beethovensprint2024
  • Loading branch information
pbauer authored Aug 20, 2024
2 parents d6876c6 + 1806178 commit 6865957
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/collective/exportimport/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 6865957

Please sign in to comment.