forked from bai/curriculum-project-hub
fix(hub): mark bootstrap Inbox as SYSTEM_INBOX
Alpha silo bootstrap created the root Inbox without kind=SYSTEM_INBOX, so Feishu card project creation tried to insert a second Inbox and hit the sibling-name unique index. Tag the bootstrap folder correctly and promote any legacy root Inbox on ensure.
This commit is contained in:
@@ -62,6 +62,11 @@ describe("Alpha Silo bootstrap", () => {
|
||||
{ roleId: "draft", label: "草稿", isDefault: true },
|
||||
{ roleId: "review", label: "审校", isDefault: false },
|
||||
]);
|
||||
await expect(prisma.folder.findMany({
|
||||
where: { organizationId: "org_alpha", archivedAt: null },
|
||||
select: { name: true, kind: true, parentId: true },
|
||||
})).resolves.toEqual([{ name: "Inbox", kind: "SYSTEM_INBOX", parentId: null }]);
|
||||
|
||||
|
||||
const persisted = JSON.stringify({
|
||||
feishu: await prisma.feishuApplicationCredentialVersion.findMany(),
|
||||
|
||||
Reference in New Issue
Block a user