Skip to content

Commit

Permalink
fix(editor): only check entity validity if it is not a new entity
Browse files Browse the repository at this point in the history
fixes #147
  • Loading branch information
landonreed committed May 13, 2018
1 parent 153291a commit 368ef14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/manager/actions/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {SECURE_API_PREFIX} from '../../common/constants'
import {getConfigProperty} from '../../common/util/config'
import {uploadFile} from '../../common/util/upload-file'
import fileDownload from '../../common/util/file-download'
import {ENTITY} from '../../editor/constants'
import {getKeyForId} from '../../editor/util/gtfs'
import {getEntityGraphQLRoot, getEntityIdField, getGraphQLFieldsForEntity} from '../../gtfs/util'
import {handleJobResponse, setErrorMessage, startJobMonitor} from './status'
Expand Down Expand Up @@ -217,7 +218,9 @@ export function fetchGTFSEntities ({namespace, id, type, editor = false, replace
.then(data => {
dispatch(receiveGTFSEntities({namespace, id, component: type, data, editor, replaceNew}))
const activePatternId = patternId || getState().editor.data.active.subEntityId
checkEntityIdValidity(data, type, id, activePatternId)
if (activePatternId !== ENTITY.NEW_ID) {
checkEntityIdValidity(data, type, id, activePatternId)
}
if (replaceNew) {
// FIXME Verify this is working properly.
const {feedSourceId} = getState().editor.data.active
Expand Down

0 comments on commit 368ef14

Please sign in to comment.