app/service/organization.py
@@ -17,7 +17,7 @@ async def create_dept(db, dept_name, leader, phone, address, status, order_num, roles, groups,parent_id): try: dept_model = OrganizationModel(id=str(uuid.uuid4()),name=dept_name, address=address,leader=leader,phone=phone,seq=order_num,status=status) dept_model = OrganizationModel(id=str(uuid.uuid4()),name=dept_name, address=address,leader=leader,phone=phone,seq=order_num,status=str(status)) if parent_id: dept_model.parent = db.get(OrganizationModel, parent_id) if roles: