Bug 34431: (QA follow-up) Fix duplicate backend options
Prevent adding backend option if the option already exists Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
ec28e4c958
commit
c529e53b89
|
|
@ -533,10 +533,12 @@ $(document).ready(function() {
|
|||
},
|
||||
success: function(backends){
|
||||
backends.sort((a, b) => a.ill_backend_id.localeCompare(b.ill_backend_id)).forEach(function(backend) {
|
||||
$('#illfilter_backend').append(
|
||||
'<option value="' + backend.ill_backend_id +
|
||||
'">' + backend.ill_backend_id + '</option>'
|
||||
);
|
||||
if( $('#illfilter_backend option[value=' + backend.ill_backend_id + ']').length == 0 ){
|
||||
$('#illfilter_backend').append(
|
||||
'<option value="' + backend.ill_backend_id +
|
||||
'">' + backend.ill_backend_id + '</option>'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
let all_existing_statuses = [];
|
||||
|
|
@ -569,7 +571,6 @@ $(document).ready(function() {
|
|||
}
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue