From 7b9cb6553bdd8ce0afde4c66be30194d3e33497d Mon Sep 17 00:00:00 2001 From: esensar Date: Tue, 23 Oct 2018 21:11:59 +0200 Subject: [PATCH 1/2] Fix bad device ownerships check for dashboard resource --- app/api/resources/dashboard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/resources/dashboard.py b/app/api/resources/dashboard.py index b4598e7..9aad019 100644 --- a/app/api/resources/dashboard.py +++ b/app/api/resources/dashboard.py @@ -111,7 +111,7 @@ class DashboardWidgetListResource(ProtectedResource): @swag_from('swagger/create_dashboard_widget_spec.yaml') def post(self, args, dashboard_id): validate_dashboard_ownership(dashboard_id) - validate_dashboard_ownership(args['device_id']) + validate_device_ownership(args['device_id']) success = dashboard.create_widget( dashboard_id, args['device_id'], @@ -142,7 +142,7 @@ class DashboardWidgetResource(ProtectedResource): @swag_from('swagger/update_dashboard_widget_spec.yaml') def put(self, args, dashboard_id, widget_id): validate_dashboard_ownership(dashboard_id) - validate_dashboard_ownership(args['device_id']) + validate_device_ownership(args['device_id']) success = dashboard.patch_widget( widget_id, args['device_id'], @@ -160,7 +160,7 @@ class DashboardWidgetResource(ProtectedResource): def patch(self, args, dashboard_id, widget_id): validate_dashboard_ownership(dashboard_id) if args.get('device_id') is not None: - validate_dashboard_ownership(args['device_id']) + validate_device_ownership(args['device_id']) success = dashboard.patch_widget( widget_id, args.get('device_id'), From cf34117575264a04c6bf46c1dcbd0434f533563c Mon Sep 17 00:00:00 2001 From: esensar Date: Tue, 23 Oct 2018 21:12:27 +0200 Subject: [PATCH 2/2] Version 0.3.1 --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index dd6bec1..750e3c1 100644 --- a/config.py +++ b/config.py @@ -2,7 +2,7 @@ import os # App configuration DEBUG = os.environ['DEBUG'] -APP_VERSION = '0.3.0' +APP_VERSION = '0.3.1' # Define the application directory BASE_DIR = os.path.abspath(os.path.dirname(__file__))