Skip to content

Commit a2cc52e

Browse files
committed
If a project has already been deleted just return
1 parent e458693 commit a2cc52e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

apps/webapp/app/services/deleteOrganization.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class DeleteOrganizationService {
7070
// loop through the projects and delete them
7171
const projectDeleteService = new DeleteProjectService();
7272
for (const project of organization.projects) {
73-
await projectDeleteService.call({ projectId: project.id, userId, ignoreDeleted: true });
73+
await projectDeleteService.call({ projectId: project.id, userId });
7474
}
7575

7676
//set all the integrations to disabled

apps/webapp/app/services/deleteProject.server.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { DisableScheduleSourceService } from "./schedules/disableScheduleSource.
66

77
type Options = ({ projectId: string } | { projectSlug: string }) & {
88
userId: string;
9-
ignoreDeleted: boolean;
109
};
1110

1211
export class DeleteProjectService {
@@ -52,10 +51,7 @@ export class DeleteProjectService {
5251
}
5352

5453
if (project.deletedAt) {
55-
if (options.ignoreDeleted) {
56-
return;
57-
}
58-
throw new Error("Project already deleted");
54+
return;
5955
}
6056

6157
//disable and delete all jobs

0 commit comments

Comments
 (0)