mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
Merge pull request #47 from senju1337/fix/OPS-88
fix: haiku is_default parameter was always 1
This commit is contained in:
commit
c587fe6c3c
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.
|
||||
"""
|
||||
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
|
||||
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>")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue