summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 32aa244..b83abb4 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1216,6 +1216,10 @@ def action_mode():
category='error')
return redirect(url_for('commands'))
available_modes = [(mode, mode) for mode in r.json()['modes']]
+ if not available_modes:
+ flash(_('no boot templates are available in the server'),
+ category='error')
+ return redirect(url_for('commands'))
form.boot.choices = list(available_modes)
form.ok.render_kw = { 'formaction': url_for('action_mode') }