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

This commit is contained in:
simontigers
2024-01-03 14:26:40 +08:00
committed by GitHub
parent ec8f626b8f
commit 995e581315
2 changed files with 10 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ class DepartmentIDView(APIView):
class DepartmentParentView(APIView):
url_prefix = (f'{prefix}/allow_parent',)
def get(self):
def put(self):
department_id = request.args.get('department_id', None)
if department_id is None:
abort(400, ErrFormat.department_id_is_required)