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
-- database appropriately
runResourceT $ runDB' $ do
ment <- getBy $ UniqueStackage ident
forM_ ment $ \(Entity sid _) -> do
let sid = entityKey stackageEnt
updateWhere
[PackageStackage ==. sid]
[PackageHasHaddocks =. False]