summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-11-29 12:29:47 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-29 13:20:18 +0100
commit7f932216171f98c5806b364cf6abfeb9f662b425 (patch)
tree12889905ad422b54fc0a6c246ce9392b1260d96a /ogcp/views.py
parent3b932fc6a884a3fda8b7a5fdddac85aef8e21a30 (diff)
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
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py6
1 files changed, 3 insertions, 3 deletions
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']