Skip to content

Commit dcaa7e0

Browse files
committed
fix(editor): fix trip writes for non-frequency based trips
1 parent ef765d9 commit dcaa7e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/editor/components/timetable/TimetableEditor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ export default class TimetableEditor extends Component {
109109
// If a frequency-based trip, never use exact times. NOTE: there is no
110110
// column to edit this field in the timetable grid.
111111
objectPath.set(newRow, 'frequencies.0.exactTimes', 0)
112+
} else {
113+
// If not using frequencies, set frequencies to empty array so that SQL backend
114+
// is happy.
115+
objectPath.set(newRow, 'frequencies', [])
112116
}
113117
objectPath.set(newRow, 'feedId', this.props.feedSource.id)
114118
objectPath.set(newRow, 'patternId', activePattern.patternId)

0 commit comments

Comments
 (0)