mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
fix: haiku is_default parameter was always 1
Refs: OPS-88
This commit is contained in:
parent
ff50d4f5bb
commit
5b88aeacb9
1 changed files with 4 additions and 2 deletions
|
|
@ -78,9 +78,11 @@ def haiku_index_view():
|
||||||
:raises KeyError: If no haikus exist in the store yet.
|
:raises KeyError: If no haikus exist in the store yet.
|
||||||
"""
|
"""
|
||||||
haiku_id: int | None = store.get_id_of_latest_haiku()
|
haiku_id: int | None = store.get_id_of_latest_haiku()
|
||||||
if haiku_id is None:
|
haiku_default = haiku_id is None
|
||||||
|
if haiku_default:
|
||||||
haiku_id = 0
|
haiku_id = 0
|
||||||
return redirect(url_for("haiku_view", haiku_id=haiku_id, is_default=1))
|
return redirect(url_for("haiku_view", haiku_id=haiku_id,
|
||||||
|
is_default=1 if haiku_default else 0))
|
||||||
|
|
||||||
|
|
||||||
@app.route("/haiku/<int:haiku_id>")
|
@app.route("/haiku/<int:haiku_id>")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue