From bce422ffc8ec548053ff7c838b82df985f82d7e3 Mon Sep 17 00:00:00 2001 From: penzai Date: Tue, 4 Feb 2020 10:53:07 +0800 Subject: [PATCH] fix: update attribute group without name params will fail. #tests/test_cmdb_ci_type.py::test_update_attribute_group_ci_type --- cmdb-api/api/lib/cmdb/ci_type.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmdb-api/api/lib/cmdb/ci_type.py b/cmdb-api/api/lib/cmdb/ci_type.py index 8c7934d..500cd67 100644 --- a/cmdb-api/api/lib/cmdb/ci_type.py +++ b/cmdb-api/api/lib/cmdb/ci_type.py @@ -441,6 +441,8 @@ class CITypeAttributeGroupManager(object): return abort(400, "Group <{0}> duplicate".format(name)) if name is not None: group.update(name=name) + else: + name = group.name cls.create_or_update(group.type_id, name, attr_order, group_order)