From d12b401d304f0fbc57289ecf601e1a39aab6e624 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Fri, 17 Dec 2021 13:14:46 +0100 Subject: Add available ogLives to client details Otherwise, ogLive field always shows the default value. --- ogcp/views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ogcp/views.py b/ogcp/views.py index 4f29f2f..c05511b 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -559,6 +559,12 @@ def action_client_info(): form.room.data = db_client['room'] form.boot.data = db_client['boot'] + r = g.server.get('/oglive/list') + available_oglives = r.json()['oglive'] + for oglive in available_oglives: + choice = (oglive.get('directory'), oglive.get('directory')) + form.livedir.choices.append(choice) + r = g.server.get('/mode') available_modes = [(mode, mode) for mode in r.json()['modes']] form.boot.choices = list(available_modes) -- cgit v1.2.3-18-g5258