summaryrefslogtreecommitdiffstats
path: root/src/commodities.lisp
diff options
context:
space:
mode:
authorEl-BG-1970 <elouangros@hotmail.com>2022-07-28 22:01:43 +0200
committerEl-BG-1970 <elouangros@hotmail.com>2022-07-28 22:01:43 +0200
commit39730c70367bcaa96e34982b90268d2170c75e90 (patch)
treedf23eb96ff5db84ab6b6c82488f433c85758b893 /src/commodities.lisp
parent201bdac932778ccf420df492acb7eecaa209b0dd (diff)
downloadtransacc-39730c70367bcaa96e34982b90268d2170c75e90.tar.gz
added some checks to commodities and inventory to pass tests
Diffstat (limited to 'src/commodities.lisp')
-rw-r--r--src/commodities.lisp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commodities.lisp b/src/commodities.lisp
index 474fe7d..1302a98 100644
--- a/src/commodities.lisp
+++ b/src/commodities.lisp
@@ -13,6 +13,7 @@
:accessor price)))
(defun new-commodity (name price)
- (make-instance 'commodity
- :name name
- :price price))
+ (when (> price 0)
+ (make-instance 'commodity
+ :name name
+ :price price)))