Skip to content

Commit 88977f3

Browse files
committed
fix(projects): retain project name for workspace archival
1 parent 204e5f1 commit 88977f3

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎apps/sim/lib/projects/__integration__/foundation.integration.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,13 @@ describe('Project foundation at the database and application boundary', () => {
803803
expect(rows.map((row) => row.archivedAt)).not.toContain(null)
804804
const [record] = await db.select().from(project).where(eq(project.id, f.projectId))
805805
expect(record.archivedAt).not.toBeNull()
806+
expect(
807+
results.flatMap((result) =>
808+
result.status === 'fulfilled' && result.value.archivedProject
809+
? [result.value.archivedProject]
810+
: []
811+
)
812+
).toEqual([{ id: record.id, name: record.name }])
806813
})
807814

808815
check('removing one of several environments keeps the Project active', async () => {

‎apps/sim/lib/projects/membership.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export async function lockWorkspaceProject(tx: DbTransaction, workspaceId: strin
146146
.select({
147147
project: {
148148
id: project.id,
149+
name: project.name,
149150
ownerId: project.ownerId,
150151
organizationId: project.organizationId,
151152
archivedAt: project.archivedAt,

0 commit comments

Comments
 (0)