Split the new_tags and delete_tags paramaters if they are strings on spaces.

This commit is contained in:
lumberyard-employee-dm
2021-06-11 15:04:51 -05:00
committed by GitHub
parent 3127bf7477
commit fe441b01a0
+2 -2
View File
@@ -45,10 +45,10 @@ def edit_project_props(proj_path, proj_name, new_origin, new_display,
if new_icon:
proj_json['icon_path'] = new_icon
if new_tags:
tag_list = [new_tags] if isinstance(new_tags, str) else new_tags
tag_list = new_tags.split() if isinstance(new_tags, str) else new_tags
proj_json.setdefault('user_tags', []).extend(tag_list)
if delete_tags:
removal_list = [delete_tags] if isinstance(delete_tags, str) else delete_tags
removal_list = delete_tags.split() if isinstance(delete_tags, str) else delete_tags
if 'user_tags' in proj_json:
for tag in removal_list:
if tag in proj_json['user_tags']: