summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Peter <dev@marius-peter.com>2025-12-14 15:28:10 +0100
committerMarius Peter <dev@marius-peter.com>2025-12-14 15:28:10 +0100
commit2a1c552c44411e7f044bbd1585390cde31239043 (patch)
treeea8d8e52f09c5b95a271855380553449be6e770c
parenta8aad6d717e029c42a11f66eba88166fd163581a (diff)
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.
-rw-r--r--views.rkt5
1 files 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)))
Copyright 2019--2026 Marius PETER