Skip to content

Commit

Permalink
Tweak .get default
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz committed Dec 14, 2021
1 parent 9ba36a4 commit c4bb53f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bonfire/namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ def get_namespaces(available=False, mine=False):
for ns in all_namespaces:
ns_name = ns["metadata"]["name"]
clowdapps_data = [
app for app in all_clowdapps if app.get("metadata").get("namespace") == ns_name
] or None
app for app in all_clowdapps if app.get("metadata", {}).get("namespace") == ns_name
]
reservation_data = [
res for res in all_res if res.get("status", {}).get("namespace") == ns_name
]
kwargs = {
"namespace_data": ns,
"clowdapps_data": clowdapps_data,
"clowdapps_data": clowdapps_data or None,
"reservation_data": reservation_data[0] if reservation_data else None,
}
all_ns_kwargs.append(kwargs)
Expand Down

0 comments on commit c4bb53f

Please sign in to comment.