Skip to content

Commit

Permalink
Add break so else is not executed when doc was updated
Browse files Browse the repository at this point in the history
  • Loading branch information
yaph committed Oct 7, 2020
1 parent ea9b4c8 commit afffe64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions logya/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def add_collections(doc, site_index, collections):
for idx, collection_doc in enumerate(content['docs']):
if doc['url'] == collection_doc['url']:
site_index[collection_url]['docs'][idx].update(doc)
break
else:
content['docs'].append(doc)
else:
Expand Down

0 comments on commit afffe64

Please sign in to comment.