Skip to content

Commit

Permalink
add client status
Browse files Browse the repository at this point in the history
  • Loading branch information
WSL0809 committed May 9, 2024
1 parent 35998e2 commit c1bc443
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/allocate_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def allocate_room_by_client_id(client_id: int, room_number: str, current_u
detail="Client not found",
)

if client.status != ClientStatus.manual_create.value:
if client.status != ClientStatus.manual_create_without_room.value:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="此用户并非手动添加,无法分配房间",
Expand Down
2 changes: 1 addition & 1 deletion api/insert_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def update_client_and_room(db, insert_client_recv: InsertClientRecv):
reserve_recv_dict = dict(insert_client_recv)
reserve_recv_dict["meal_plan_seller"] = json.dumps(insert_client_recv.meal_plan_seller)
reserve_recv_dict["recovery_plan_seller"] = json.dumps(insert_client_recv.recovery_plan_seller)
reserve_recv_dict["status"] = ClientStatus.manual_create.value
reserve_recv_dict["status"] = ClientStatus.manual_create_without_room.value
try:
db.execute(create_client_sql, reserve_recv_dict)
db.flush()
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ClientStatus(Enum):
# 住完已经离开月子中心的顾客
out = 1
# 手动创建
manual_create = 2
manual_create_without_room = 2


class BabyNurseWorkStatus(Enum):
Expand Down

0 comments on commit c1bc443

Please sign in to comment.