File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/labthings/server/view Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def get_value(self):
4141 raise TypeError ("Attribute 'get' of View must be a callable" )
4242 response = get_method () # pylint: disable=not-callable
4343 if isinstance (response , ResponseBase ): # Pluck useful data out of HTTP response
44- return response .json if response .json else response .data . decode ()
44+ return response .json if response .json else response .data
4545 else : # Unless somehow an HTTP response isn't returned...
4646 return response
4747
@@ -113,6 +113,10 @@ class PropertyView(View):
113113 __apispec__ = {"tags" : {"properties" }}
114114
115115 def dispatch_request (self , * args , ** kwargs ):
116+ if request .method == "GET" :
117+ return View .dispatch_request (self , * args , ** kwargs )
118+
119+ # FIXME: Sketchy as this breaks if the response is a generator/loop
116120 resp = View .dispatch_request (self , * args , ** kwargs )
117121
118122 property_value = self .get_value ()
You can’t perform that action at this time.
0 commit comments