Add crop-id guard.

Commit
c0c81afb346254893457c33e3a9eb9081d13332a
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
models/crop-requirement.rkt
index 6ddf1aa0..20480911 100644..100644
@@ -28,9 +28,10 @@
28 28 "nutrient.rkt"
29 29 "crop.rkt")
30 30
31 Removed: ;; Instances of this struct are persisted in the crop_requirements table.
32 Removed: (struct crop-requirement (id profile crop-id) #:transparent)
33 Removed:
31 Added: (struct crop-requirement (id profile crop-id nutrient-values)
32 Added: #:transparent
33 Added: #:guard (λ (id profile crop-id nutrient-values _)
34 Added: (values id profile (if (sql-null? crop-id) #f crop-id) nutrient-values)))
34 35
35 36 ;; CREATE
36 37