Skip to content

Commit 3d91bc9

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

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/projects/detail/containers/SpecificationContainer.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ import ScopeAndSpecificationContainer from './ScopeAndSpecificationContainer'
1010
import { getProjectProductTemplates } from '../../../helpers/templates'
1111

1212
const SpecificationContainer = (props) => {
13-
const sections = props.productTemplates[0].template.questions
13+
const template = props.productTemplates[0].template
14+
15+
// as for old projects we use productTemplate instead of projectTemplate
16+
// it has `questions` property instead of `sections`
17+
// so we normalize template scheme for other components here
18+
template.sections = template.questions
1419

1520
return (
1621
<ScopeAndSpecificationContainer
1722
{...{
1823
...props,
19-
sections
24+
template
2025
}}
2126
/>
2227
)

0 commit comments

Comments
 (0)