summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ogcp/views.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 59e086f..1004aec 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1004,10 +1004,24 @@ def action_client_update():
if db_client['repo_id'] == repo["id"]]
form.repo.choices.extend([(repo["id"], repo["name"]) for repo in repositories
if db_client['repo_id'] != repo["id"]])
+ ip = list(ips)[0]
+ setup = get_client_setup(ip)
+ if setup and setup[0].get('code') == 'MSDOS':
+ setup[0]['code'] = 'MBR'
+
+ for entry in setup:
+ if images and entry['image'] != 0:
+ image = next((img for img in images if img['id'] == entry['image']), None)
+ if image:
+ entry['image'] = image['name']
+ else:
+ entry['image'] = ""
+ else:
+ entry['image'] = ""
form.submit.render_kw = {"formaction": url_for('action_client_update')}
return render_template('actions/client_details.html', form=form,
- parent="scopes.html", scopes=scopes)
+ parent="scopes.html", scopes=scopes, setup=setup)
def find_folder(folder_id, scopes):
scopes = deque([scopes['scope']])