From 79939a6c44521ea418d2173c056457311ecca5bd Mon Sep 17 00:00:00 2001 From: root Date: Fri, 27 Aug 2021 17:34:02 +0200 Subject: [PATCH] Fixes bug in deployments view with missing os field in desktops --- CHANGELOG.md | 6 ++++++ api/src/api/libv2/api_deployments.py | 2 +- api/src/api/libv2/api_socketio_deployments.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e01a04efd..7db712328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [3.0.2] - 2021-08-27 + +### Fixed + +- Deployments with started desktops failed + ## [3.0.1] - 2021-08-27 ### Fixed diff --git a/api/src/api/libv2/api_deployments.py b/api/src/api/libv2/api_deployments.py index 0d76b3d4c..d95bea71e 100644 --- a/api/src/api/libv2/api_deployments.py +++ b/api/src/api/libv2/api_deployments.py @@ -39,7 +39,7 @@ def Get(self,user_id,deployment_id): with app.app_context(): deployment = r.table('deployments').get(deployment_id).without('create_dict').run(db.conn) if user_id != deployment['user']: raise - desktops = list(r.table('domains').get_all(deployment_id,index='tag').pluck('id','user','name','description','status','icon','image','persistent','parents','create_dict','viewer','options').run(db.conn)) + desktops = list(r.table('domains').get_all(deployment_id,index='tag').pluck('id','user','name','description','status','icon','os','image','persistent','parents','create_dict','viewer','options').run(db.conn)) parsed_desktops=[] for desktop in desktops: diff --git a/api/src/api/libv2/api_socketio_deployments.py b/api/src/api/libv2/api_socketio_deployments.py index cd0178d09..b6202da2d 100644 --- a/api/src/api/libv2/api_socketio_deployments.py +++ b/api/src/api/libv2/api_socketio_deployments.py @@ -63,7 +63,7 @@ def run(self): deployment={'id':c['new_val']['id'], 'name':c['new_val']['name'], 'user':user, - 'totalDesktops': r.table('domains').get_all(deployment['id'],index='tag').count().run(db.conn), + 'totalDesktops': r.table('domains').get_all(c['new_val']['id'],index='tag').count().run(db.conn), "startedDesktops": 0 } else: