Skip to content

Commit

Permalink
fix(xo-server/Import): userdevice is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Feb 7, 2024
1 parent 2498a4f commit 89b1ad5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”
- Fix[Import/VMWare]: Fix `(Failure \"Expected string, got 'I(0)'\")` (PR [#7361](https://github.com/vatesfr/xen-orchestra/issues/7361))

### Packages to release

> When modifying a package, add it here with its release type.
Expand All @@ -27,4 +29,6 @@
<!--packages-start-->

- xo-server patch

<!--packages-end-->
4 changes: 2 additions & 2 deletions packages/xo-server/src/xo-mixins/migrate-vm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default class MigrateVm {
VDI: vdi.$ref,
VM: vm.$ref,
device: `xvd${String.fromCharCode('a'.charCodeAt(0) + userdevice)}`,
userdevice: userdevice < 3 ? userdevice : userdevice + 1,
userdevice: String(userdevice < 3 ? userdevice : userdevice + 1),
})
} else {
vhd = await openDeltaVmdkasVhd(esxi, datastore, path + '/' + fileName, parentVhd, {
Expand Down Expand Up @@ -316,7 +316,7 @@ export default class MigrateVm {
VDI: vdi.$ref,
VM: vm.$ref,
device: `xvd${String.fromCharCode('a'.charCodeAt(0) + userdevice)}`,
userdevice: userdevice < 3 ? userdevice : userdevice + 1,
userdevice: String(userdevice < 3 ? userdevice : userdevice + 1),
})
} else {
if (parentVhd === undefined) {
Expand Down

0 comments on commit 89b1ad5

Please sign in to comment.