From 9a60ca4848f0e5425f01ce80d98603774386656a Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Wed, 3 Jan 2024 16:07:48 +0000 Subject: [PATCH] api: prevent error when submitting empty task data --- src/Monocle/Backend/Index.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Monocle/Backend/Index.hs b/src/Monocle/Backend/Index.hs index d50e31b3e..56adefd44 100644 --- a/src/Monocle/Backend/Index.hs +++ b/src/Monocle/Backend/Index.hs @@ -822,6 +822,7 @@ orphanTaskDataDocToBHDoc TaskDataDoc {..} = ) taskDataAdd :: MonoQuery :> es => IndexEffects es => Text -> [SearchPB.TaskData] -> Eff es () +taskDataAdd _ [] = pure () taskDataAdd crawlerName tds = do -- extract change URLs from input TDs let urls = from . SearchPB.taskDataChangeUrl <$> tds