Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

avoid code duplication

ulferts244951aa5b88
diff --git a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
index 87047c8de41..e8b5beffd1e 100644
--- a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
+++ b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
@@ -196,17 +196,16 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp
} else {
this.wpListService
.create(this.currentQuery!, val)
- .then(() => this.toolbarDisabled = false)
- .catch(() => this.toolbarDisabled = false);
+ .finally(() => { this.toolbarDisabled = false; });
}
}
updateTitleName(val:string) {
this.toolbarDisabled = true;
this.currentQuery!.name = val;
- this.wpListService.save(this.currentQuery)
- .then(() => this.toolbarDisabled = false)
- .catch(() => this.toolbarDisabled = false);
+ this.wpListService
+ .save(this.currentQuery)
+ .finally(() => { this.toolbarDisabled = false; });
}
updateTitle(query?:QueryResource) {