diff --git a/src/moin/cli/migration/moin19/import19.py b/src/moin/cli/migration/moin19/import19.py index 8953cbb16..ec25896f9 100644 --- a/src/moin/cli/migration/moin19/import19.py +++ b/src/moin/cli/migration/moin19/import19.py @@ -395,7 +395,12 @@ def iter_attachments(self): attachname = fname try: yield AttachmentRevision( - self.name, attachname, os.path.join(attachmentspath, fname), self.editlog, self.acl + self.name, + attachname, + os.path.join(attachmentspath, fname), + self.editlog, + self.acl, + self.target_namespace, ) except Exception: logging.exception(f"AttachmentRevision {self.name!r}/{attachname!r} raised exception:") @@ -641,7 +646,7 @@ class AttachmentRevision: moin 1.9 attachment (there is no revisioning, just 1 revision per attachment) """ - def __init__(self, item_name, attach_name, attpath, editlog, acl): + def __init__(self, item_name, attach_name, attpath, editlog, acl, namespace): try: meta = editlog.find_attach(attach_name) except KeyError: @@ -659,6 +664,7 @@ def __init__(self, item_name, attach_name, attpath, editlog, acl): meta[hash_name] = hash_digest meta[SIZE] = size meta[ITEMID] = make_uuid() + meta[NAMESPACE] = namespace meta[REVID] = make_uuid() meta[REV_NUMBER] = 1 meta[ITEMTYPE] = ITEMTYPE_DEFAULT