Skip to content

Commit

Permalink
Default workflow ID to the project default
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Jan 6, 2021
1 parent 31f0c89 commit 128283d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import getDefaultPageProps from '@helpers/getDefaultPageProps'
export async function getServerSideProps({ params, query, req, res }) {
const { subjectSetID, workflowID } = params
const { props } = await getDefaultPageProps({ params, query, req, res })
const { project } = props.initialState
if (subjectSetID) {
props.subjectSetID = subjectSetID
}
if (workflowID) {
props.workflowID = workflowID
} else {
props.workflowID = project?.configuration['default_workflow']
}
return ({ props })
}

0 comments on commit 128283d

Please sign in to comment.