refactor: minor
This commit is contained in:
parent
48208c9105
commit
282d56a5c2
@ -122,9 +122,7 @@ workflowGraphForm template = validateAForm validateWorkflowGraphForm . hoistAFor
|
||||
[fRef] -> return fRef
|
||||
_other -> throwE $ SomeMessage MsgWorkflowGraphFormInvalidNumberOfFiles
|
||||
mContent <- for (fileContent $ sourceFile fRef) $ \fContent -> lift . runDB . runConduit $ fContent .| C.fold
|
||||
content <- case mContent of
|
||||
Nothing -> throwE $ SomeMessage MsgWorkflowGraphFormUploadIsDirectory
|
||||
Just c -> return c
|
||||
content <- maybe (throwE $ SomeMessage MsgWorkflowGraphFormUploadIsDirectory) return mContent
|
||||
either (throwE . SomeMessage . MsgYAMLFieldDecodeFailure . displayException) return . runCatch $ Yaml.decodeThrow content
|
||||
fromGraph :: WorkflowGraph FileIdent CryptoUUIDUser -> FileUploads
|
||||
fromGraph g = yieldM . runDB $ do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user