Skip to content

Commit d332cd9

Browse files
committed
Optimize short circuit when there are no project changes
Though the service itself doesn't have heavy logic in this case, the ProjectUpdatedEvent is still fired. And this has heavy logic.
1 parent 15743b5 commit d332cd9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/project/project.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ export class ProjectService {
286286
this.privileges
287287
.for(session, resolveProjectType(currentProject), currentProject)
288288
.verifyChanges(changes, { pathPrefix: 'project' });
289+
if (!changedStep && Object.keys(changes).length === 0) {
290+
return await this.readOneUnsecured(input.id, session, changeset);
291+
}
289292

290293
let updated = currentProject;
291294
if (changedStep) {

0 commit comments

Comments
 (0)