Skip to content

Commit

Permalink
If tags are empty it now keeps existing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pewsplosions authored Oct 30, 2019
1 parent f4ffcdb commit c19b572
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/work/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@ def set_given_metadata(self, md, keep_tags):
for tag in md.tags:
if (tag not in new_tags):
new_tags.append(tag)
if (new_tags is not None and len(new_tags) > 0):
all_empty = True
for tag in new_tags:
if (len(tag) > 0): all_empty = False
if (new_tags is not None and len(new_tags) > 0 and not all_empty):
md.set("tags", new_tags)

0 comments on commit c19b572

Please sign in to comment.