feat: link order to DMs
This commit is contained in:
parent
b45927a15d
commit
d7d7869b0e
11 changed files with 32 additions and 23 deletions
|
|
@ -645,14 +645,11 @@ async def api_update_order_status(
|
|||
try:
|
||||
assert data.shipped != None, "Shipped value is required for order"
|
||||
merchant = await get_merchant_for_user(wallet.wallet.user)
|
||||
assert merchant, "Merchant cannot be found"
|
||||
assert merchant, "Merchant cannot be found for order {data.id}"
|
||||
|
||||
order = await update_order_shipped_status(merchant.id, data.id, data.shipped)
|
||||
assert order, "Cannot find updated order"
|
||||
|
||||
merchant = await get_merchant_for_user(merchant.id)
|
||||
assert merchant, f"Merchant cannot be found for order {data.id}"
|
||||
|
||||
data.paid = order.paid
|
||||
dm_content = json.dumps(data.dict(), separators=(",", ":"), ensure_ascii=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue