Only create tags if tags are provided (#36921)

pull/4420/head
Sloane Hertel 2018-03-01 15:30:08 -05:00 committed by Ryan Brown
parent 0e7106b106
commit 9deef5626f
1 changed files with 1 additions and 3 deletions

View File

@ -238,13 +238,11 @@ def tags_changed(pcx_id, client, module):
tags = [item for sublist in tag_values for item in sublist] tags = [item for sublist in tag_values for item in sublist]
if sorted(pcx_tags) == sorted(tags): if sorted(pcx_tags) == sorted(tags):
changed = False changed = False
return changed elif tags:
else:
delete_tags(pcx_id, client, module) delete_tags(pcx_id, client, module)
create_tags(pcx_id, client, module) create_tags(pcx_id, client, module)
changed = True changed = True
return changed return changed
return changed
def describe_peering_connections(params, client): def describe_peering_connections(params, client):