Fix usb passthrough claim get condition

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2024-09-09 12:39:14 +02:00
parent 63381b350f
commit 60a509cedb
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393

View File

@ -69,7 +69,7 @@ export default class USBDevice extends SteveModel {
get passthroughClaim() { get passthroughClaim() {
const passthroughClaims = this.$getters['all'](HCI.USB_CLAIM) || []; const passthroughClaims = this.$getters['all'](HCI.USB_CLAIM) || [];
return !!this.status && passthroughClaims.find(req => req?.status?.nodeName === this.status?.nodeName && req?.status?.pciAddress === this.status?.pciAddress); return !!this.status && passthroughClaims.find(req => req?.status?.nodeName === this.status?.nodeName && req?.metadata?.name === this.metadata?.name);
} }
// this is an id for each 'type' of device - there may be multiple instances of device CRs // this is an id for each 'type' of device - there may be multiple instances of device CRs