Skip to content

Commit 056c86d

Browse files
committed
improved fix for issue #2782 - Cannot load specification page for old projects (non v3)
1 parent 3d91bc9 commit 056c86d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/projects/detail/containers/SpecificationContainer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
* NOTE data is loaded by the parent ProjectDetail component
55
*/
66
import React from 'react'
7+
import _ from 'lodash'
78
import { connect } from 'react-redux'
89

910
import ScopeAndSpecificationContainer from './ScopeAndSpecificationContainer'
1011
import { getProjectProductTemplates } from '../../../helpers/templates'
1112

1213
const SpecificationContainer = (props) => {
13-
const template = props.productTemplates[0].template
14-
1514
// as for old projects we use productTemplate instead of projectTemplate
1615
// it has `questions` property instead of `sections`
1716
// so we normalize template scheme for other components here
18-
template.sections = template.questions
17+
const template = _.omit(props.productTemplates[0].template, 'questions')
18+
template.sections = props.productTemplates[0].template.questions
1919

2020
return (
2121
<ScopeAndSpecificationContainer

0 commit comments

Comments
 (0)