Permit empty strings for the brand name.

This allows the canonical-name/brand-name database uniqueness constraint.

Commit
21d5ace6a0f90c4e7e6fd6a19cae4cfce7d45c97
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
models/fertilizer-product.rkt
index a002ad4f..e79a7072 100644..100644
@@ -28,10 +28,7 @@
28 28 (struct fertilizer-product (id canonical-name brand-name nutrient-values)
29 29 #:transparent
30 30 #:guard (λ (id canonical-name brand-name nutrient-values _)
31 Removed: (values id
32 Removed: canonical-name
33 Removed: (if (or (sql-null? brand-name) (= (string-length brand-name) 0)) #f brand-name)
34 Removed: nutrient-values))
31 Added: (values id canonical-name (if (sql-null? brand-name) #f brand-name) nutrient-values))
35 32 #:property prop:custom-write
36 33 (λ (v out _mode)
37 34 (fprintf out "Fertilizer #~a\n" (fertilizer-product-id v))