Skip to content

Commit 874791e

Browse files
committed
fix(clickup): clickup.lists selector accepts listSpaceId context like clickup.folders
1 parent 4cc5aa9 commit 874791e

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

apps/sim/hooks/selectors/providers/clickup/selectors.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,24 @@ export const clickupSelectors = {
9696
'selectors',
9797
'clickup.lists',
9898
context.oauthCredential ?? 'none',
99-
context.spaceId ?? 'none',
99+
context.spaceId ?? context.listSpaceId ?? 'none',
100100
context.folderId ?? 'none',
101101
],
102102
enabled: ({ context }) =>
103-
Boolean(context.oauthCredential && (context.folderId || context.spaceId)),
103+
Boolean(
104+
context.oauthCredential && (context.folderId || context.spaceId || context.listSpaceId)
105+
),
104106
fetchList: async ({ context, signal }: SelectorQueryArgs) => {
105107
const credentialId = ensureCredential(context, 'clickup.lists')
106-
if (!context.folderId && !context.spaceId) {
108+
const spaceId = context.spaceId || context.listSpaceId
109+
if (!context.folderId && !spaceId) {
107110
throw new Error('Missing folder or space ID for clickup.lists selector')
108111
}
109112
const data = await requestJson(selectorContracts.clickupListsSelectorContract, {
110113
body: {
111114
credential: credentialId,
112115
folderId: context.folderId,
113-
spaceId: context.spaceId,
116+
spaceId,
114117
workflowId: context.workflowId,
115118
},
116119
signal,

0 commit comments

Comments
 (0)