diff --git a/frontend/app/components/work-packages/wp-attachments/wp-attachments.directive.ts b/frontend/app/components/work-packages/wp-attachments/wp-attachments.directive.ts index cc20873a49..0ec2045b51 100644 --- a/frontend/app/components/work-packages/wp-attachments/wp-attachments.directive.ts +++ b/frontend/app/components/work-packages/wp-attachments/wp-attachments.directive.ts @@ -103,8 +103,7 @@ export class WorkPackageAttachmentsController { if (this.files.length > 0) { this.wpAttachments.upload(this.workPackage, this.files).then(() => { this.files = []; - this.loadAttachments(); - this.wpCacheService.loadWorkPackageLinks(this.workPackage, 'activities'); + this.wpCacheService.loadWorkPackageLinks(this.workPackage, 'attachments', 'activities'); }); } }; diff --git a/frontend/app/components/work-packages/wp-attachments/wp-attachments.service.test.ts b/frontend/app/components/work-packages/wp-attachments/wp-attachments.service.test.ts index 0473cedd6a..9398cb59f4 100644 --- a/frontend/app/components/work-packages/wp-attachments/wp-attachments.service.test.ts +++ b/frontend/app/components/work-packages/wp-attachments/wp-attachments.service.test.ts @@ -57,6 +57,7 @@ describe('wpAttachments service', () => { } }; + beforeEach(angular.mock.module('openproject')); beforeEach(angular.mock.module('openproject.workPackages')); beforeEach(angular.mock.inject((_wpAttachments_, _$httpBackend_, _$q_) => {