Spaces:
Sleeping
Sleeping
Commit ·
65d5f2a
1
Parent(s): 68d2ebc
fix(appointments): Remove UUID conversion for merchant_id in appointment responses and services
Browse files
app/appointments/controllers/router.py
CHANGED
|
@@ -168,7 +168,7 @@ async def _to_appt_response(appt: dict) -> AppointmentResponse:
|
|
| 168 |
) for s in appt.get("services", [])]
|
| 169 |
return AppointmentResponse(
|
| 170 |
appointment_id=UUID(appt["appointment_id"]) if isinstance(appt["appointment_id"], str) else appt["appointment_id"],
|
| 171 |
-
merchant_id=
|
| 172 |
source=appt["source"],
|
| 173 |
booking_channel=appt.get("booking_channel"),
|
| 174 |
customer_id=UUID(appt["customer_id"]) if appt.get("customer_id") and isinstance(appt["customer_id"], str) else appt.get("customer_id"),
|
|
|
|
| 168 |
) for s in appt.get("services", [])]
|
| 169 |
return AppointmentResponse(
|
| 170 |
appointment_id=UUID(appt["appointment_id"]) if isinstance(appt["appointment_id"], str) else appt["appointment_id"],
|
| 171 |
+
merchant_id=appt["merchant_id"],
|
| 172 |
source=appt["source"],
|
| 173 |
booking_channel=appt.get("booking_channel"),
|
| 174 |
customer_id=UUID(appt["customer_id"]) if appt.get("customer_id") and isinstance(appt["customer_id"], str) else appt.get("customer_id"),
|
app/appointments/services/service.py
CHANGED
|
@@ -276,7 +276,7 @@ async def checkout_appointment(appointment_id: UUID) -> Tuple[UUID, dict]:
|
|
| 276 |
"qty": 1
|
| 277 |
} for s in services]
|
| 278 |
sale_id = await create_sale(
|
| 279 |
-
merchant_id=
|
| 280 |
items=items,
|
| 281 |
appointment_id=appointment_id,
|
| 282 |
customer_id=UUID(appt["customer_id"]) if appt.get("customer_id") and isinstance(appt["customer_id"], str) else appt.get("customer_id"),
|
|
|
|
| 276 |
"qty": 1
|
| 277 |
} for s in services]
|
| 278 |
sale_id = await create_sale(
|
| 279 |
+
merchant_id=appt["merchant_id"],
|
| 280 |
items=items,
|
| 281 |
appointment_id=appointment_id,
|
| 282 |
customer_id=UUID(appt["customer_id"]) if appt.get("customer_id") and isinstance(appt["customer_id"], str) else appt.get("customer_id"),
|