From c36d78a80e44e3d4e5c23c0f2819baa32e17443c Mon Sep 17 00:00:00 2001 From: Rebecca Madsen Date: Fri, 29 Apr 2022 00:09:13 -0400 Subject: [PATCH] update protocol validation --- src/__mocks__/config.js | 2 +- src/components/sections/ValidationSection.js | 4 ++-- src/config/index.js | 2 +- src/protocol-validation | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/__mocks__/config.js b/src/__mocks__/config.js index dfb266b91..cadeb302e 100644 --- a/src/__mocks__/config.js +++ b/src/__mocks__/config.js @@ -1,4 +1,4 @@ /* eslint-env jest */ /* eslint-disable import/prefer-default-export */ -export const APP_SCHEMA_VERSION = 7; +export const APP_SCHEMA_VERSION = 8; diff --git a/src/components/sections/ValidationSection.js b/src/components/sections/ValidationSection.js index add63a2e9..0891a39d6 100644 --- a/src/components/sections/ValidationSection.js +++ b/src/components/sections/ValidationSection.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useSelector, useDispatch } from 'react-redux'; import { change, formValueSelector } from 'redux-form'; -import { get, filter } from 'lodash'; +import { get, pickBy } from 'lodash'; import { Section, Row } from '@components/EditorLayout'; import Validations from '@components/Validations'; import { getFieldId } from '../../utils/issues'; @@ -25,7 +25,7 @@ const ValidationSection = ({ return true; }; - const existingVariablesForType = filter(existingVariables, (variable) => get(variable, 'type') === variableType); + const existingVariablesForType = pickBy(existingVariables, (variable) => get(variable, 'type') === variableType); return (