OK, break out ternary operator (good to know that it slowed you down to read it)
This commit is contained in:
@@ -212,7 +212,10 @@ class Controller(object):
|
|||||||
del arg_dict['action']
|
del arg_dict['action']
|
||||||
arg_dict['req'] = req
|
arg_dict['req'] = req
|
||||||
result = method(**arg_dict)
|
result = method(**arg_dict)
|
||||||
return self._serialize(result, req) if type(result) is dict else result
|
if type(result) is dict:
|
||||||
|
return self._serialize(result, req)
|
||||||
|
else:
|
||||||
|
return result
|
||||||
|
|
||||||
def _serialize(self, data, request):
|
def _serialize(self, data, request):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user