fix(xo-web/vm/tab-network): an error has occurred when trying to sort empty network (#5639)

This issue happens when you have an ACL role on one VM, but you don't have an ACL role on the network of this VM.
This commit is contained in:
Mathieu 2021-03-05 09:37:40 +01:00 committed by GitHub
parent 872b05a7de
commit d928157569
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Editable number] When you are trying to edit a number and it's failing, display an error (PR [#5634](https://github.com/vatesfr/xen-orchestra/pull/5634))
- [VM/Network] Fix `an error has occurred` when trying to sort the table by the network's name (PR [#5639](https://github.com/vatesfr/xen-orchestra/pull/5639))
### Packages to release

View File

@ -710,7 +710,7 @@ const COLUMNS = [
<VifNetwork vif={vif} network={networks[vif.$network]} resourceSet={resourceSet} />
),
name: _('vifNetworkLabel'),
sortCriteria: (vif, userData) => userData.networks[vif.$network].name_label,
sortCriteria: (vif, userData) => get(() => userData.networks[vif.$network].name_label),
},
{
itemRenderer: ({ id, rateLimit }) => (