Fix potentially having a null in the creation time of the sql query
This commit is contained in:
parent
4dd29a72b6
commit
dd0f554eb8
|
@ -14,7 +14,7 @@ data GetLatestPostsPerBoardResponse = GetLatestPostsPerBoardResponse
|
||||||
, pathpart :: String
|
, pathpart :: String
|
||||||
-- , post_id :: Maybe Int64
|
-- , post_id :: Maybe Int64
|
||||||
-- , board_post_id :: Int64
|
-- , board_post_id :: Int64
|
||||||
, creation_time :: UTCTime
|
, creation_time :: Maybe UTCTime
|
||||||
-- , thread_id :: Int64
|
-- , thread_id :: Int64
|
||||||
-- , board_thread_id :: Integer
|
-- , board_thread_id :: Integer
|
||||||
} deriving (Show, Generic, FromJSON)
|
} deriving (Show, Generic, FromJSON)
|
||||||
|
|
|
@ -174,7 +174,13 @@ syncWebsites csmr_settings = do
|
||||||
|
|
||||||
let board_id_to_last_modified = Map.fromList $
|
let board_id_to_last_modified = Map.fromList $
|
||||||
map
|
map
|
||||||
(\b -> (GLPPBR.board_id b, GLPPBR.creation_time b))
|
( \b ->
|
||||||
|
( GLPPBR.board_id b
|
||||||
|
-- set t = 0 if there are no posts on the board yet
|
||||||
|
-- this way it will check all of the threads
|
||||||
|
, fromMaybe (Lib.epochToUTCTime 0) $ GLPPBR.creation_time b
|
||||||
|
)
|
||||||
|
)
|
||||||
latest_posts_per_board
|
latest_posts_per_board
|
||||||
|
|
||||||
let site_name_to_site :: Map.Map String Site.Site =
|
let site_name_to_site :: Map.Map String Site.Site =
|
||||||
|
|
Loading…
Reference in New Issue