Skip to content

Commit

Permalink
fix(validation): fix check for fatal exception on validation result
Browse files Browse the repository at this point in the history
  • Loading branch information
landonreed committed Feb 12, 2018
1 parent fc1face commit 52f3d6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/manager/components/validation/GtfsValidationSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class ValidationSummaryTable extends Component {
const {
version
} = this.props
// FIXME NPE on validationresult error_counts?
if (version && version.validationResult && version.validationResult.error_counts.length === 0) {
return <div className='lead text-center '>No validation issues found.</div>
} else if (!version || !version.validationResult) {
Expand Down
8 changes: 5 additions & 3 deletions lib/manager/components/version/FeedVersionViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,15 @@ class VersionSectionSelector extends Component {

_renderIssuesLabel (version) {
const tableFatalExceptions = getTableFatalExceptions(version)
const hasCriticalError = version.validationSummary.loadStatus !== 'SUCCESS' ||
version.feedLoadResult.fatalException || tableFatalExceptions.length > 0
const {validationSummary, feedLoadResult} = version
const hasCriticalError = validationSummary.loadStatus !== 'SUCCESS' ||
!feedLoadResult || feedLoadResult.fatalException ||
tableFatalExceptions.length > 0
const color = this.props.validationJob
? 'warning'
: hasCriticalError
? 'danger'
: version.validationSummary.errorCount
: validationSummary.errorCount
? 'warning'
: 'success'
const text = this.props.validationJob
Expand Down

0 comments on commit 52f3d6e

Please sign in to comment.