fix(xo-web/xoa): handle string expiration dates (#5967)

See xoa-support#4114
See xoa-support#4192

www-xo may return a string instead of a number in some rare cases
This commit is contained in:
Pierre Donias 2021-10-27 16:59:59 +02:00 committed by GitHub
parent 215146f663
commit 0c87dee31c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@
- [Netbox] Fix error when testing plugin on versions older than 2.10 (PR [#5963](https://github.com/vatesfr/xen-orchestra/pull/5963))
- [Snapshot] Fix "Create VM from snapshot" creating a template instead of a VM (PR [#5955](https://github.com/vatesfr/xen-orchestra/pull/5955))
- [Host/Logs] Improve the display of log content (PR [#5943](https://github.com/vatesfr/xen-orchestra/pull/5943))
- [XOA licenses] Fix expiration date displaying "Invalid date" in some rare cases (PR [#5967](https://github.com/vatesfr/xen-orchestra/pull/5967))
### Packages to release

View File

@ -139,7 +139,7 @@ const PRODUCTS_COLUMNS = [
},
{
name: _('licenseExpires'),
itemRenderer: ({ expires }) => (expires !== undefined ? <ShortDate timestamp={expires} /> : '-'),
itemRenderer: ({ expires }) => (expires !== undefined ? <ShortDate timestamp={+expires} /> : '-'),
sortCriteria: 'expires',
sortOrder: 'desc',
},