mirror of https://github.com/rancher/ui.git
fluent requires weight to be a number, on the round trip back cast 2 int
rancher/rancher#31184
This commit is contained in:
parent
1eafa94e55
commit
b949387d8c
|
|
@ -611,13 +611,19 @@ export default Component.extend(NewOrEdit, Parse, {
|
|||
endpoint = `${ get(attrs, 'host') }`
|
||||
}
|
||||
|
||||
let castWeight = parseInt(get(attrs, 'weight'), 10);
|
||||
|
||||
if (Number.isNaN(castWeight)) {
|
||||
castWeight = 100;
|
||||
}
|
||||
|
||||
return {
|
||||
endpoint,
|
||||
sharedKey: get(attrs, 'shared_key'),
|
||||
username: get(attrs, 'username'),
|
||||
password: get(attrs, 'password'),
|
||||
hostname: get(attrs, 'name'),
|
||||
weight: get(attrs, 'weight'),
|
||||
weight: castWeight,
|
||||
standby: get(attrs, 'standby'),
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue