Skip to content

Commit

Permalink
Don't crash on mssing image
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Mar 7, 2024
1 parent f7ac2c0 commit 9ff4f2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datasette_extract/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def extract_create_table(datasette, request, scope, receive):
if hint:
properties[value]["description"] = hint

image = post_vars["image"]
image = post_vars.get("image") or ""

return await extract_to_table_post(
datasette, request, content, image, database, table, properties
Expand Down Expand Up @@ -115,7 +115,7 @@ async def extract_to_table(datasette, request, scope, receive):
if description:
properties[name]["description"] = description

image = post_vars["image"]
image = post_vars.get("image") or ""
content = (post_vars.get("content") or "").strip()
return await extract_to_table_post(
datasette, request, content, image, database, table, properties
Expand Down

0 comments on commit 9ff4f2f

Please sign in to comment.