Skip to content

Commit fd50f01

Browse files
committed
api: Fix resetting a query title
When removing a query title, make sure it's represented as null in the database, and not as an empty string. Otherwise it'll be impossible to click in the various lists and otherwise break stuff. Change-Id: I8f4d22d99e9a692105c23a9ad40214eb52923a61
1 parent d0cbbb2 commit fd50f01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

quarry/web/api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ def api_set_meta() -> Tuple[Union[str, Response], int]:
7474
return "Authorization denied", 403
7575

7676
if "title" in request.form:
77-
query.title = request.form["title"]
77+
title = request.form["title"]
78+
if not title.strip():
79+
title = None
80+
query.title = title
7881
if "published" in request.form:
7982
query.published = request.form["published"] == "1"
8083
if "description" in request.form:

0 commit comments

Comments
 (0)