aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript
diff options
context:
space:
mode:
authorZog2018-02-08 10:33:46 +0100
committerLuc Donnet2018-02-20 10:20:18 +0100
commit3dcea81c627c1c740630ce7306bac55256ce8037 (patch)
tree1ff79bdb5f04aba4503b47c781aaa0146d1ac32a /app/javascript
parent3809301116aec5466445b29637026804da3d6745 (diff)
downloadchouette-core-3dcea81c627c1c740630ce7306bac55256ce8037.tar.bz2
Refs #5863 @6h; Remove workbench id from the querystring
Infer it when possible, and use a nested otherwise
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js b/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js
index 7ab85a1ea..72dbd0152 100644
--- a/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js
+++ b/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js
@@ -29,11 +29,11 @@ export default class BSelect4 extends Component {
val = this.props.selection.selectedJPModal
}
}
- if(this.useAjax()){
- val = val.published_name
- }
- else{
- if(val){
+ if(val){
+ if(this.useAjax()){
+ val = val.published_name
+ }
+ else{
val = val.id
}
}