Skip to content

Commit b9750dd

Browse files
authored
[server] fix projcts-service (#18882)
1 parent 47ed26d commit b9750dd

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

components/server/src/projects/projects-service.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import { Authorizer, SYSTEM_USER } from "../authorization/authorizer";
3131
import { TransactionalContext } from "@gitpod/gitpod-db/lib/typeorm/transactional-db-impl";
3232
import { ScmService } from "./scm-service";
3333
import { daysBefore, isDateSmaller } from "@gitpod/gitpod-protocol/lib/util/timeutil";
34-
import { TrustedValue } from "@gitpod/gitpod-protocol/lib/util/scrubbing";
3534

3635
@injectable()
3736
export class ProjectsService {
@@ -58,7 +57,7 @@ export class ProjectsService {
5857
await this.auth.checkPermissionOnOrganization(userId, "read_info", orgId);
5958
const projects = await this.projectDB.findProjects(orgId);
6059
const filteredProjects = await this.filterByReadAccess(userId, projects);
61-
return Promise.all(filteredProjects.map(this.migratePrebuildSettingsOnDemand));
60+
return Promise.all(filteredProjects.map((p) => this.migratePrebuildSettingsOnDemand(p)));
6261
}
6362

6463
async findProjects(
@@ -82,7 +81,7 @@ export class ProjectsService {
8281
const total = projects.total;
8382
return {
8483
total,
85-
rows: await Promise.all(rows.map(this.migratePrebuildSettingsOnDemand)),
84+
rows: await Promise.all(rows.map((p) => this.migratePrebuildSettingsOnDemand(p))),
8685
};
8786
}
8887

@@ -112,7 +111,7 @@ export class ProjectsService {
112111
result.push(project);
113112
}
114113
}
115-
return Promise.all(result.map(this.migratePrebuildSettingsOnDemand));
114+
return Promise.all(result.map((p) => this.migratePrebuildSettingsOnDemand(p)));
116115
}
117116

118117
async markActive(
@@ -468,9 +467,8 @@ export class ProjectsService {
468467

469468
return project;
470469
} catch (error) {
471-
log.error("Prebuild settings migration failed: " + error, {
470+
log.error("Prebuild settings migration failed", error, {
472471
projectId: project.id,
473-
error: new TrustedValue(error),
474472
});
475473
return project;
476474
}

0 commit comments

Comments
 (0)