Skip to content

Commit 1cd9df8

Browse files
committed
When selecting the best project, factor in deleted ones
1 parent 4f22cc9 commit 1cd9df8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/webapp/app/presenters/SelectBestProjectPresenter.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class SelectBestProjectPresenter {
1414
const projectId = await getCurrentProjectId(request);
1515
if (projectId) {
1616
const project = await this.#prismaClient.project.findUnique({
17-
where: { id: projectId, organization: { members: { some: { userId } } } },
17+
where: { id: projectId, deletedAt: null, organization: { members: { some: { userId } } } },
1818
include: { organization: true },
1919
});
2020
if (project) {
@@ -28,6 +28,7 @@ export class SelectBestProjectPresenter {
2828
organization: true,
2929
},
3030
where: {
31+
deletedAt: null,
3132
organization: {
3233
members: { some: { userId } },
3334
},

0 commit comments

Comments
 (0)