Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dashboard] Don't list deleted user projects #5111

Merged
merged 1 commit into from
Aug 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/gitpod-db/src/typeorm/project-db-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ProjectDBImpl implements ProjectDB {

public async findUserProjects(userId: string): Promise<Project[]> {
const repo = await this.getRepo();
return repo.find({ userId });
return repo.find({ userId, markedDeleted: false });
}

public async storeProject(project: Project): Promise<Project> {
Expand All @@ -67,7 +67,7 @@ export class ProjectDBImpl implements ProjectDB {

public async setProjectConfiguration(projectId: string, config: ProjectConfig): Promise<void> {
const repo = await this.getRepo();
const project = await repo.findOne({ id: projectId, deleted: false });
const project = await repo.findOne({ id: projectId, markedDeleted: false });
if (!project) {
throw new Error('A project with this ID could not be found');
}
Expand Down