Skip to content

Commit

Permalink
Fix missing notes icon by returning a Just [] when notes exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Mar 14, 2024
1 parent 9cb8fa3 commit e5a4640
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tasklite-core/source/FullTask.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ instance FromRow FullTask where
( \value -> case fieldData value of
SQLText _txt ->
-- TODO: Parse notes as a JSON array
Ok Nothing
-- Must return a `Just` to signal that notes exist
Ok (Just [])
SQLNull -> Ok Nothing
val ->
Errors
Expand Down
2 changes: 1 addition & 1 deletion tasklite-core/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ testSuite conf now = do
`shouldBe` emptyFullTask
{ FullTask.body = "Just a test"
, -- TODO: Fix after notes are returned as a JSON array
FullTask.notes = Nothing
FullTask.notes = Just []
, FullTask.priority = Just 1.0
, FullTask.metadata = decode jsonTask
}
Expand Down

0 comments on commit e5a4640

Please sign in to comment.