fix(api): common department edit method (#356)

* fix(api): common department edit method

* fix(api): common department edit method
This commit is contained in:
simontigers
2024-01-03 14:31:54 +08:00
committed by GitHub
parent 995e581315
commit 82ea1ddc79

View File

@@ -62,7 +62,7 @@ class DepartmentView(APIView):
class DepartmentIDView(APIView):
url_prefix = (f'{prefix}/<int:_id>',)
def get(self, _id):
def put(self, _id):
form = DepartmentForm(MultiDict(request.json))
if not form.validate():
abort(400, ','.join(['{}: {}'.format(filed, ','.join(msg))