From 1a0821766baeb793d36dff0099810aeb0e202c00 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 28 Mar 2017 15:45:03 +0200 Subject: Low items don't count against shopping list --- Handler/List.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Handler') diff --git a/Handler/List.hs b/Handler/List.hs index 7ab4ebe..8f9e777 100644 --- a/Handler/List.hs +++ b/Handler/List.hs @@ -28,7 +28,8 @@ list = runDB $ do let references' = Set.filter (isNothing . flip find items . matches) references matches (Reference{..} `WithType` _) Item{..} - | today `isBefore` itemExpires = itemNormKind == referenceNormKind + | today `isBefore` itemExpires + , not $ itemRunningLow = itemNormKind == referenceNormKind | otherwise = False isBefore _ DateNever = True -- cgit v1.2.3