fix: ensure warning message triggers when both hosts and nodes are absent

This commit is contained in:
w940853815
2025-04-10 18:31:26 +08:00
committed by w940853815
parent 92a863b078
commit 1b3e97512b

View File

@@ -146,7 +146,7 @@ export default {
query: (query, cb) => { query: (query, cb) => {
const { hosts, nodes } = this.getSelectedNodesAndHosts() const { hosts, nodes } = this.getSelectedNodesAndHosts()
if (hosts.length === 0) { if (hosts.length === 0 && nodes.length === 0) {
this.$message.warning(`${this.$t('RequiredAssetOrNode')}`) this.$message.warning(`${this.$t('RequiredAssetOrNode')}`)
return cb([]) return cb([])
} }