mirror of
https://github.com/veops/cmdb.git
synced 2025-09-19 11:36:52 +08:00
Update ci_type.py
fix exception rasied by request.values when request's content-type is json
This commit is contained in:
@@ -141,7 +141,7 @@ class CITypeAttributeView(APIView):
|
|||||||
:param type_id:
|
:param type_id:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
attributes = request.values.get("attributes")
|
attributes = request.json.get("attributes")
|
||||||
current_app.logger.debug(attributes)
|
current_app.logger.debug(attributes)
|
||||||
if not isinstance(attributes, list):
|
if not isinstance(attributes, list):
|
||||||
return abort(400, "attributes must be list")
|
return abort(400, "attributes must be list")
|
||||||
|
Reference in New Issue
Block a user