fix: Fix automatic credential selection when credentials are shared (#5020)

* fix: fix default credentials when inserting nodes

* fix: update default without sharing

* fix: fix clearing credential bug, automatically selecting shared cred bug

* fix: include sharable creds in automatic selections

* fix: update getter

* fix: refactor subscribe logic, fix update bug

* fix: remove unnessary import

* format: prettier
This commit is contained in:
Mutasem Aldmour
2022-12-23 16:32:06 +01:00
committed by GitHub
parent 4651147096
commit 6a8448da5f
4 changed files with 94 additions and 44 deletions

View File

@@ -1714,7 +1714,7 @@ export default mixins(
const credentialPerType =
nodeTypeData.credentials &&
nodeTypeData.credentials
.map((type) => this.credentialsStore.getCredentialsByType(type.name))
.map((type) => this.credentialsStore.getUsableCredentialByType(type.name))
.flat();
if (credentialPerType && credentialPerType.length === 1) {