feat: validate currency for stall shipping zones

This commit is contained in:
Vlad Stan 2023-03-02 10:36:39 +02:00
parent 16a6104b25
commit c0dce31231
2 changed files with 11 additions and 0 deletions

View file

@ -154,6 +154,8 @@ async def api_create_stall(
wallet: WalletTypeInfo = Depends(require_admin_key),
) -> Stall:
try:
data.validate_stall()
print("### stall", json.dumps(data.dict()))
merchant = await get_merchant_for_user(wallet.wallet.user)
assert merchant, "Cannot find merchat for stall"
@ -182,6 +184,8 @@ async def api_update_stall(
wallet: WalletTypeInfo = Depends(require_admin_key),
) -> Stall:
try:
data.validate_stall()
merchant = await get_merchant_for_user(wallet.wallet.user)
assert merchant, "Cannot find merchat for stall"