getCompletionValue (Entity lid list) = do
  total <- runDB $ count [ItemList ==. lid]
  if total == 0
    then
      return (0, (Entity lid list))
    else do
      numDone <- runDB $ count [ItemStatus ==. True, ItemList ==. lid]
      return ((fromIntegral numDone) / (fromIntegral total) * 100, (Entity lid list))
getCompletionValue (Entity lid list) = do
  total <- runDB $ count [ItemList ==. lid]
  if total == 0
    then
      return (0, (Entity lid list))
    else do
      numDone <- runDB $ count [ItemStatus ==. True, ItemList ==. lid]
      return ((fromIntegral numDone) / (fromIntegral total) * 100, (Entity lid list))
getCompletionValue (Entity lid list) = do
  total <- runDB $ count [ItemList ==. lid]
  if total == 0
    then
      return (0, (Entity lid list))
    else do
      numDone <- runDB $ count [ItemStatus ==. True, ItemList ==. lid]
      return ((fromIntegral numDone) / (fromIntegral total) * 100, (Entity lid list))