summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-12-20 12:05:44 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2021-12-20 12:21:08 +0100
commita8e16a3388087d8d2adfae63d43f074f1f4d9960 (patch)
treec6b213a0471729995146981b26597120e88a9e6b
parentd12b401d304f0fbc57289ecf601e1a39aab6e624 (diff)
Check images list content in client details view
Otherwise, client image assignation fails if "images" variable is empty.
-rw-r--r--ogcp/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index c05511b..114e768 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -582,7 +582,7 @@ def action_client_info():
setup = get_client_setup(ips)
for entry in setup:
- if entry['image'] != 0:
+ if images and entry['image'] != 0:
image = next(img for img in images if img['id'] == entry['image'])
entry['image'] = image['name']
else: