summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 9aaef17..c0b2c98 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1009,6 +1009,12 @@ def action_client_update():
if setup and setup[0].get('code') == 'MSDOS':
setup[0]['code'] = 'MBR'
+ r = server.get('/images')
+ if r.status_code != requests.codes.ok:
+ flash(_('ogServer: error retrieving images list'),
+ category='error')
+ return redirect(url_for('scopes'))
+ images = r.json()['images']
for entry in setup:
if images and entry['image'] != 0:
image = next((img for img in images if img['id'] == entry['image']), None)