dont iterate chosen_tag_ids when no tags were chosen.

pull/8/head
l3uddz 7 years ago
parent c769888e4f
commit a96c8d9522

@ -25,6 +25,9 @@ def sonarr_series_tag_id_from_network(profile_tags, network_tags, network):
def sonarr_readable_tag_from_ids(profile_tag_ids, chosen_tag_ids): def sonarr_readable_tag_from_ids(profile_tag_ids, chosen_tag_ids):
try: try:
if not chosen_tag_ids:
return None
tags = [] tags = []
for tag_name, tag_id in profile_tag_ids.items(): for tag_name, tag_id in profile_tag_ids.items():
if tag_id in chosen_tag_ids: if tag_id in chosen_tag_ids:

Loading…
Cancel
Save