feat: bulk quantity edit for collection table

This commit is contained in:
KoalaTrapLord authored and GitHub committed 2026-03-25 10:12:03 -04:00
1 parent 49bab7fb0a
commit e162d50608
3 files changed
+204 -1

No files matched your search

+5
View File
@@ -406,6 +406,11 @@ async def update_collection_card(cardId: int, body: dict):
if finish_val not in ("NORMAL", "FOIL", "ETCHED"):
raise HTTPException(400, "finish must be NORMAL, FOIL, or ETCHED")
updates["finish"] = finish_val
if "quantity" in body:
qty_val = int(body["quantity"])
if qty_val < 0:
raise HTTPException(400, "quantity must be >= 0")
updates["quantity"] = qty_val
if not updates:
return _add_image_url(_row_to_dict(row))