Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ae11c0e

Browse files
committedJul 12, 2015
Fixed detection of no parent (for attachments).
1 parent 439b310 commit ae11c0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎nikola/plugins/command/import_wordpress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ def process_item_if_attachment(self, item):
837837
if post_type == 'attachment':
838838
files = self.import_attachment(item, wordpress_namespace)
839839
# If parent was found, store relation with imported files
840-
if parent_id is not None:
840+
if parent_id is not None and int(parent_id) != 0:
841841
self.attachments[int(parent_id)][post_id] = files
842842
else:
843843
LOGGER.warn("Attachment #{0} ({1}) has no parent!".format(post_id, files))

0 commit comments

Comments
 (0)
Please sign in to comment.