From 2a1c552c44411e7f044bbd1585390cde31239043 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 14 Dec 2025 15:28:10 +0100 Subject: Brand name can be an empty string. This is not clean, but is required for now because of the (canonical-name, brand-name) database uniqueness constraint. --- views.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/views.rkt b/views.rkt index 7dd6dbd..ccafb99 100644 --- a/views.rkt +++ b/views.rkt @@ -286,8 +286,9 @@ (a ((class "btn btn-danger") [href ,(format "/ferti/fertilizers/~a/destroy" id)]) "Supprimer"))) (page-template product-name - `((h1 ((class "display-1 mb-3")) ,(or brand-name "Intrant générique")) - (h5 ((class "display-5 mb-3")) ,product-name) + `((h1 ((class "display-1 mb-3")) ,product-name) + (h5 ((class "display-5 mb-3")) + ,(if (non-empty-string? brand-name) brand-name "Intrant générique")) ,button-group ,table))) -- cgit v1.2.3