From 7f932216171f98c5806b364cf6abfeb9f662b425 Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Wed, 29 Nov 2023 12:29:47 +0100 Subject: views: fix client details - netmask is no accesible anymore, remove it. - The form made reference to fields that do not exist anymore: netmask and netdriver (removed in a previous commit) - make the repository field show the repo that is in use --- ogcp/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ogcp') diff --git a/ogcp/views.py b/ogcp/views.py index fa458e3..73bc4ba 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -812,13 +812,13 @@ def action_client_info(): form.ip.data = db_client['ip'] form.mac.data = db_client['mac'] form.serial_number.data = db_client['serial_number'] - form.netmask.data = db_client['netmask'] form.livedir.data = db_client['livedir'] form.remote.data = db_client['remote'] form.maintenance.data = db_client['maintenance'] form.netiface.data = db_client['netiface'] - form.netdriver.data = db_client['netdriver'] - form.repo.data = db_client['repo_id'] + repositories = get_repositories(server) + form.repo.choices = [(repo["id"], repo["name"]) for repo in repositories + if db_client['repo_id'] == repo["id"]] form.room.data = db_client['room'] form.boot.data = db_client['boot'] -- cgit v1.2.3-18-g5258