Skip to content

Commit

Permalink
Merge pull request #517 from Turbo87/fix-aircraft-selection
Browse files Browse the repository at this point in the history
Fix aircraft model selection
  • Loading branch information
Turbo87 authored Oct 27, 2016
2 parents 401d1ca + ed2c897 commit 456d5af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ember/app/components/aircraft-model-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default Ember.Component.extend({
}),

model: Ember.computed('modelsWithNull.[]', 'modelId', function() {
return this.get('modelsWithNull').findBy('id', this.get('modelId'));
return this.get('modelsWithNull').findBy('id', this.get('modelId') || null);
}),

actions: {
Expand Down
6 changes: 3 additions & 3 deletions ember/app/templates/flight/change-aircraft.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{#form-page title=(t "choose-aircraft")}}
{{change-aircraft-form
flightId=model.id
modelId=model.flight.model.id
registration=model.flight.registration
competitionId=model.flight.competitionId
modelId=(readonly model.flight.model.id)
registration=(readonly model.flight.registration)
competitionId=(readonly model.flight.competitionId)
models=model.aircraftModels
onDidSave=(action "transitionToFlight")}}
{{/form-page}}

0 comments on commit 456d5af

Please sign in to comment.