From edde467c8702430d01000b7931b4863f60358c5b Mon Sep 17 00:00:00 2001 From: simontigers <47096077+simontigers@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:03:09 +0800 Subject: [PATCH] fix(api): common_data delele (#282) --- cmdb-api/api/views/common_setting/common_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdb-api/api/views/common_setting/common_data.py b/cmdb-api/api/views/common_setting/common_data.py index 3793a5e..6d44ba1 100644 --- a/cmdb-api/api/views/common_setting/common_data.py +++ b/cmdb-api/api/views/common_setting/common_data.py @@ -24,12 +24,12 @@ class DataView(APIView): class DataViewWithId(APIView): url_prefix = (f'{prefix}//',) - def put(self, _id): + def put(self, data_type, _id): params = request.json res = CommonDataCRUD.update_data(_id, **params) return self.jsonify(res.to_dict()) - def delete(self, _id): + def delete(self, data_type, _id): CommonDataCRUD.delete(_id) return self.jsonify({})