Skip to content
Permalink
Browse files
Fixed detection of no parent (for attachments).
  • Loading branch information
felixfontein committed Jul 12, 2015
1 parent 439b310 commit ae11c0edacd8a0fecdefaa2fd5f7a72c18be1acc
Showing with 1 addition and 1 deletion.
  1. +1 −1 nikola/plugins/command/import_wordpress.py
@@ -837,7 +837,7 @@ def process_item_if_attachment(self, item):
if post_type == 'attachment':
files = self.import_attachment(item, wordpress_namespace)
# If parent was found, store relation with imported files
if parent_id is not None:
if parent_id is not None and int(parent_id) != 0:
self.attachments[int(parent_id)][post_id] = files
else:
LOGGER.warn("Attachment #{0} ({1}) has no parent!".format(post_id, files))

0 comments on commit ae11c0e

Please sign in to comment.