From aa4445de7a91704e32f404b13e8d47e5f3b50e8e Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Tue, 14 Jan 2020 15:07:06 +0000 Subject: [PATCH] Fixed borked metadata PUT validation --- openflexure_microscope/api/v2/views/captures.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/api/v2/views/captures.py b/openflexure_microscope/api/v2/views/captures.py index 31eef23c..4cb82325 100644 --- a/openflexure_microscope/api/v2/views/captures.py +++ b/openflexure_microscope/api/v2/views/captures.py @@ -223,8 +223,9 @@ class CaptureMetadata(View): return abort(404) # 404 Not Found data_dict = JsonResponse(request).json + logging.debug(data_dict) - if type(data_dict) != list: + if type(data_dict) != dict: return abort(400) # TODO: Allow putting system metadata maybe?