Skip to content

Commit

Permalink
fix lintering issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarmu committed Jul 31, 2023
1 parent 21cad60 commit 68148eb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/lookup/controller_object_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ def run(self, terms, variables=None, **kwargs):
api_list_reduced = copy.deepcopy(api_list)
elif api_list[0]["type"] == "instance_group":
compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list]
api_list_reduced = [{key: item[key] for key in api_keys_to_keep} for item in api_list if (item["summary_fields"] and item["summary_fields"]["user_capabilities"]["delete"])]
api_list_reduced = [
{key: item[key] for key in api_keys_to_keep}
for item in api_list
if (item["summary_fields"] and item["summary_fields"]["user_capabilities"]["delete"])
]

else:
compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list]
api_list_reduced = [{key: item[key] for key in api_keys_to_keep} for item in api_list]
Expand All @@ -203,7 +208,7 @@ def run(self, terms, variables=None, **kwargs):
item.pop("summary_fields")
elif api_list[0]["type"] == "credential":
for item in api_list_reduced:
item.update({"organization": item["summary_fields"]["organization"]["name"] if item["summary_fields"]["organization"] else ''})
item.update({"organization": item["summary_fields"]["organization"]["name"] if item["summary_fields"]["organization"] else ""})
item.update({"credential_type": item["summary_fields"]["credential_type"]["name"]})
item.pop("summary_fields")
elif api_list[0]["type"] == "workflow_job_template_node":
Expand Down

0 comments on commit 68148eb

Please sign in to comment.