Avoid unnecessarily looking up StackageId in haddock unpacker

This commit is contained in:
Michael Sloan 2014-12-27 20:40:05 -08:00
parent f635977b02
commit eeb0aae9d9

View File

@ -314,8 +314,7 @@ createHaddockUnpacker root store runDB' urlRenderRef = do
-- Determine which packages have documentation and update the -- Determine which packages have documentation and update the
-- database appropriately -- database appropriately
runResourceT $ runDB' $ do runResourceT $ runDB' $ do
ment <- getBy $ UniqueStackage ident let sid = entityKey stackageEnt
forM_ ment $ \(Entity sid _) -> do
updateWhere updateWhere
[PackageStackage ==. sid] [PackageStackage ==. sid]
[PackageHasHaddocks =. False] [PackageHasHaddocks =. False]