parent
0034f0a1d3
commit
ce35bbaeb4
@ -6,6 +6,8 @@
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- [Remotes] Fix "undefined" mount option issue [#3361](https://github.com/vatesfr/xen-orchestra/issues/3361) (PR [#3363](https://github.com/vatesfr/xen-orchestra/pull/3363))
|
||||
|
||||
### Released packages
|
||||
|
||||
- xo-server v5.26.0
|
||||
|
@ -89,13 +89,16 @@ export default class {
|
||||
}
|
||||
|
||||
async createRemote ({ name, url, options }) {
|
||||
const remote = await this._remotes.add({
|
||||
const params = {
|
||||
name,
|
||||
url,
|
||||
options,
|
||||
enabled: false,
|
||||
error: '',
|
||||
})
|
||||
}
|
||||
if (options !== undefined) {
|
||||
params.options = options
|
||||
}
|
||||
const remote = await this._remotes.add(params)
|
||||
return /* await */ this.updateRemote(remote.get('id'), { enabled: true })
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ export default [
|
||||
domain = remote.domain,
|
||||
host = remote.host,
|
||||
name,
|
||||
options = remote.options,
|
||||
options = remote.options || '',
|
||||
password = remote.password,
|
||||
path = remote.path,
|
||||
port = remote.port,
|
||||
@ -64,7 +64,7 @@ export default [
|
||||
type,
|
||||
username,
|
||||
}),
|
||||
options,
|
||||
options: options !== '' ? options : null,
|
||||
}).then(reset)
|
||||
},
|
||||
createRemote: ({ reset }) => async (state, { remotes }) => {
|
||||
@ -107,7 +107,7 @@ export default [
|
||||
}
|
||||
|
||||
const url = format(urlParams)
|
||||
return createRemote(name, url, options)
|
||||
return createRemote(name, url, options !== '' ? options : undefined)
|
||||
.then(reset)
|
||||
.catch(err => error('Create Remote', err.message || String(err)))
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user