mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-26 06:40:51 +02:00
fix(core): Return homeProject when filtering workflows by project id (#12077)
This commit is contained in:
@@ -211,4 +211,13 @@ export class SharedWorkflowRepository extends Repository<SharedWorkflow> {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async getAllRelationsForWorkflows(workflowIds: string[]) {
|
||||
return await this.find({
|
||||
where: {
|
||||
workflowId: In(workflowIds),
|
||||
},
|
||||
relations: ['project'],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,8 @@ export class WorkflowRepository extends Repository<WorkflowEntity> {
|
||||
.execute();
|
||||
}
|
||||
|
||||
async getMany(sharedWorkflowIds: string[], options?: ListQuery.Options) {
|
||||
async getMany(sharedWorkflowIds: string[], originalOptions: ListQuery.Options = {}) {
|
||||
const options = structuredClone(originalOptions);
|
||||
if (sharedWorkflowIds.length === 0) return { workflows: [], count: 0 };
|
||||
|
||||
if (typeof options?.filter?.projectId === 'string' && options.filter.projectId !== '') {
|
||||
|
||||
Reference in New Issue
Block a user