Skip to content

Commit

Permalink
resolve schema update crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed May 15, 2024
1 parent 9b2f113 commit aabc35b
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 27 deletions.
8 changes: 1 addition & 7 deletions gtfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1177,10 +1177,4 @@
required: false
inputType: TEXT
columnWidth: 12
helpContent: "Name of the location group. Must be defined either once, or exhaustively for a single location_group_id."
# TODO: enable validation to match spec (only appear when appropriate)
- name: "location_id"
required: false
inputType: GTFS_STOP_OR_LOCATION_LIST
columnWidth: 12
helpContent: "Identifies a stop or location belonging to the location group."
helpContent: "Name of the location group. Must be defined either once, or exhaustively for a single location_group_id."
1 change: 0 additions & 1 deletion lib/editor/actions/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ export function fetchBaseGtfs ({
location_groups {
id
location_group_id
location_id
location_group_name
}
feed_info {
Expand Down
4 changes: 0 additions & 4 deletions lib/editor/actions/trip.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ export function fetchTripsForCalendar (
pickupBookingRuleId: pickup_booking_rule_id
dropOffBookingRuleId: drop_off_booking_rule_id
meanDurationFactor: mean_duration_factor
meanDurationOffset: mean_duration_offset
safeDurationFactor: safe_duration_factor
safeDurationOffset: safe_duration_offset
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions lib/editor/reducers/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ const data = (state: DataState = defaultState, action: Action): DataState => {
const {component, editor} = action.payload
const {data} = action.payload

if (data.feed.location_groups && data.feed.location_groups.length === 1 && data.feed.location_groups[0].location_id) {
data.feed.location_groups[0].location_id = data.feed.location_groups[0].location_id.split(',')
}

if (!editor) {
// Ignore entity fetches if not for the editor (i.e., fetching entities
// for viewing validation result details).
Expand Down
3 changes: 2 additions & 1 deletion lib/editor/util/validation/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import type {EditorTables} from '../../types/reducers'
import { getComponentMessages } from '../../../common/util/config'
import {getTableById} from '../gtfs'

import type {validationIssue, EditorValidationIssue} from './common'
import type {EditorValidationIssue} from './common'
import {validationIssue} from './common'
import {validateBookingRule} from './bookingRuleValidation'

import { EXCEPTION_EXEMPLARS } from '..'
Expand Down
10 changes: 1 addition & 9 deletions lib/gtfs/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,10 @@ export function getGraphQLFieldsForEntity (type: string, editor: boolean = false
drop_off_booking_rule_id
flex_default_travel_time
flex_default_zone_time
mean_duration_factor
mean_duration_offset
safe_duration_factor
safe_duration_offset
stop_headsign
}`
const patternLocationGroupFields = `pattern_location_groups (limit: -1) {
const patternLocationGroupFields = `pattern_location_group_stops (limit: -1) {
id
location_group_id
stop_sequence
Expand All @@ -123,10 +119,6 @@ export function getGraphQLFieldsForEntity (type: string, editor: boolean = false
drop_off_booking_rule_id
flex_default_travel_time
flex_default_zone_time
mean_duration_factor
mean_duration_offset
safe_duration_factor
safe_duration_offset
stop_headsign
}`
Expand Down
1 change: 0 additions & 1 deletion lib/types/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export type EditorTables = {
location_groups: Array<{
location_group_id: string,
location_group_name: string,
location_id: string
}>,
locations: Array<{
id: number,
Expand Down

0 comments on commit aabc35b

Please sign in to comment.