From 355b3cd8f23e13895449172134a403435425c1f2 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 21 Oct 2020 11:40:03 +0100 Subject: [PATCH] Fixed argument parsing in PreferredLocationGUIView --- openflexure_microscope/api/default_extensions/autostorage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openflexure_microscope/api/default_extensions/autostorage.py b/openflexure_microscope/api/default_extensions/autostorage.py index c3f2df11..3700ec72 100644 --- a/openflexure_microscope/api/default_extensions/autostorage.py +++ b/openflexure_microscope/api/default_extensions/autostorage.py @@ -6,6 +6,7 @@ from flask import abort from labthings import fields, find_component from labthings.extensions import BaseExtension from labthings.views import PropertyView, View +from labthings.marshalling import use_args from openflexure_microscope.api.utilities.gui import build_gui from openflexure_microscope.captures.capture_manager import BASE_CAPTURE_PATH @@ -208,8 +209,7 @@ class PreferredLocationView(PropertyView): class PreferredLocationGUIView(View): - args = {"new_path_title": fields.String(required=True)} - + @use_args({"new_path_title": fields.String(required=True)}) def post(self, args): new_path_title = args.get("new_path_title") logging.debug(new_path_title)