Moxfield import
This commit is contained in:
@@ -39,6 +39,7 @@ async def deck_cards(slug: str):
|
||||
"back_filename": c["back_filename"],
|
||||
"back_exists": bool(c["back_filename"] and (OUTPUTS / slug / c["back_filename"]).exists()),
|
||||
"scry_url": c["scry_url"],
|
||||
"is_token": bool(c["is_token"]),
|
||||
"fetch_status": c["fetch_status"],
|
||||
"price_usd": c["price_usd"],
|
||||
}
|
||||
@@ -52,6 +53,8 @@ async def upload_image(slug: str, name: str = Form(...), file: UploadFile = File
|
||||
deck = db.get_deck(slug)
|
||||
if not deck:
|
||||
raise HTTPException(404)
|
||||
if deck["source"] == "moxfield":
|
||||
raise HTTPException(409, "Moxfield-linked decks are updated by syncing, not manual edits")
|
||||
name = name.strip()
|
||||
if not name:
|
||||
raise HTTPException(400, "name required")
|
||||
|
||||
Reference in New Issue
Block a user