Skip to content

Commit

Permalink
Fixed detection of no parent (for attachments).
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jul 12, 2015
1 parent 439b310 commit ae11c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nikola/plugins/command/import_wordpress.py
Expand Up @@ -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))
Expand Down

0 comments on commit ae11c0e

Please sign in to comment.