From ba6bee80fb90a80c41118991ca754a4ba5b73440 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 23 May 2021 14:11:46 +0200 Subject: fix(panettone): Fix handling of issue-not-found The accessor function to get the ID of the `model:issue-not-found` condition is `not-found-id`, not `id`! Also, add a missing space to the title. Fixes: b/127 Change-Id: I91c71feaf1fe877e6a14453a9e75cf27d56fee31 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3140 Reviewed-by: sterni Tested-by: BuildkiteCI --- web/panettone/src/packages.lisp | 2 +- web/panettone/src/panettone.lisp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/panettone/src/packages.lisp b/web/panettone/src/packages.lisp index 3e6aa4a05f..b0833e4541 100644 --- a/web/panettone/src/packages.lisp +++ b/web/panettone/src/packages.lisp @@ -43,7 +43,7 @@ :field :previous-value :new-value :get-issue :issue-exists-p :list-issues :create-issue :set-issue-status - :update-issue :delete-issue :issue-not-found + :update-issue :delete-issue :issue-not-found :not-found-id :issue-events diff --git a/web/panettone/src/panettone.lisp b/web/panettone/src/panettone.lisp index 3d803e1fb6..0b1af742c8 100644 --- a/web/panettone/src/panettone.lisp +++ b/web/panettone/src/panettone.lisp @@ -396,7 +396,7 @@ (defun render/not-found (entity-type) (render () - (:h1 (who:esc entity-type) "Not Found"))) + (:h1 (who:esc entity-type) " Not Found"))) ;;; ;;; HTTP handlers @@ -446,7 +446,7 @@ given subject an body (in a thread, to avoid blocking)" (handler-case (funcall next) (model:issue-not-found (err) (render/not-found - (format nil "Issue #~A" (model:id err)))))) + (format nil "Issue #~A" (model:not-found-id err)))))) (defroute login-form ("/login" :method :get) (original-uri) -- cgit 1.4.1