summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/views.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 41042a8..f910626 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1771,7 +1771,11 @@ def action_mode():
if most_used_mode in r.json()['modes']:
most_used_t = (most_used_mode, mode_descriptions.get(most_used_mode, most_used_mode))
available_modes.append(most_used_t)
- available_modes.extend([(mode, mode_descriptions.get(mode, mode)) for mode in r.json()['modes'] if mode != most_used_mode])
+
+ for mode in r.json()['modes']:
+ if mode != most_used_mode:
+ available_modes.append((mode, mode_descriptions.get(mode, mode)))
+
if not available_modes:
flash(_('no boot templates are available in the server'),
category='error')