Set server variable on GET /action/image/update

Otherwise, ogCP crashes on image update.

Fixes: 8726ade ("Adapt commands to work with several ogServers")
async-tree
Javier Sánchez Parra 2022-10-26 17:48:34 +02:00
parent f834253a80
commit 0f6641d92f
1 changed files with 1 additions and 0 deletions

View File

@ -1189,6 +1189,7 @@ def action_image_update():
return redirect(url_for('commands'))
form.ip.data = ' '.join(ips)
server = get_server_from_clients(ips)
r = server.get('/images')
for image in r.json()['images']:
form.image.choices.append((image['id'], image['name']))