From fcacc436a389f672676bed3ee92bae3de35e6838 Mon Sep 17 00:00:00 2001 From: cballevre Date: Tue, 27 Feb 2024 13:56:16 +0100 Subject: [PATCH] fix(HarvestBanner): Problem with queries --- .../transactions/TransactionPageErrors/HarvestRoutes.jsx | 7 ++++--- src/lib/queries.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ducks/transactions/TransactionPageErrors/HarvestRoutes.jsx b/src/ducks/transactions/TransactionPageErrors/HarvestRoutes.jsx index f6e9e7b3bb..f0f41f1e06 100644 --- a/src/ducks/transactions/TransactionPageErrors/HarvestRoutes.jsx +++ b/src/ducks/transactions/TransactionPageErrors/HarvestRoutes.jsx @@ -29,9 +29,10 @@ const HarvestRoutes = () => { queryKonnector.options ) - const konnectorWithTriggers = konnector - ? { ...konnector, triggers: { data: triggers } } - : undefined + const konnectorWithTriggers = + konnector && trigger + ? { ...konnector, triggers: { data: triggers } } + : undefined const onDismiss = useCallback(() => { navigate('..') diff --git a/src/lib/queries.js b/src/lib/queries.js index 4144e04a73..e5cfa3732e 100644 --- a/src/lib/queries.js +++ b/src/lib/queries.js @@ -21,7 +21,7 @@ export const buildTriggersQueryByKonnectorSlug = (slug, enabled) => ({ export const buildKonnectorBySlug = (slug, enabled = Boolean(slug)) => ({ definition: () => Q('io.cozy.konnectors').getById(`io.cozy.konnectors/${slug}`), options: { - as: 'konnector', + as: `io.cozy.konnectors/${slug}`, singleDocData: true, enabled }