mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-13 21:28:29 +00:00
Fix: user rules for integrations
This commit is contained in:
parent
23bf49b4cf
commit
b4362b6c29
@ -1135,10 +1135,25 @@ export class KnowledgeGraphService {
|
||||
return null;
|
||||
}
|
||||
|
||||
const integrationAccount = await prisma.integrationAccount.findFirst({
|
||||
where: {
|
||||
integrationDefinition: {
|
||||
slug: source,
|
||||
},
|
||||
workspaceId: user.Workspace.id,
|
||||
isActive: true,
|
||||
deleted: null,
|
||||
},
|
||||
});
|
||||
|
||||
if (!integrationAccount) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Fetch active rules for this source
|
||||
const rules = await prisma.ingestionRule.findMany({
|
||||
where: {
|
||||
source,
|
||||
source: integrationAccount.id,
|
||||
workspaceId: user.Workspace.id,
|
||||
isActive: true,
|
||||
deleted: null,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user