Skip to content

Commit 335c5ff

Browse files
authored
Merge pull request #813 from CenterForOpenScience/develop
Merge hotfixes
2 parents e07af82 + 9108826 commit 335c5ff

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/app/features/preprints/store/preprint-stepper/preprint-stepper.state.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,14 @@ export class PreprintStepperState {
172172

173173
ctx.setState(patch({ preprintFile: patch({ isLoading: true }) }));
174174

175-
return this.fileService
176-
.updateFileContent(action.file, uploadedFile.links.upload)
177-
.pipe(switchMap(() => this.fileService.renameEntry(uploadedFile.links.upload, action.file.name, 'replace')));
175+
return this.fileService.updateFileContent(action.file, uploadedFile.links.upload).pipe(
176+
switchMap(() => {
177+
if (uploadedFile.name !== action.file.name) {
178+
return this.fileService.renameEntry(uploadedFile.links.upload, action.file.name, 'replace');
179+
}
180+
return EMPTY;
181+
})
182+
);
178183
}
179184

180185
@Action(FetchPreprintPrimaryFile)

src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ describe('ProjectOverviewToolbarComponent', () => {
178178
expect(component.ResourceType).toBe(ResourceType);
179179
});
180180

181-
it('should have resourceType set to Registration', () => {
182-
expect(component.resourceType).toBe(ResourceType.Registration);
181+
it('should have resourceType set to Project', () => {
182+
expect(component.resourceType).toBe(ResourceType.Project);
183183
});
184184
});
185185
});

src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class ProjectOverviewToolbarComponent {
6666

6767
isPublic = signal(false);
6868
isBookmarked = signal(false);
69-
resourceType = ResourceType.Registration;
69+
resourceType = ResourceType.Project;
7070

7171
bookmarksCollectionId = select(BookmarksSelectors.getBookmarksCollectionId);
7272
bookmarks = select(BookmarksSelectors.getBookmarks);

src/assets/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,6 +3067,7 @@
30673067
"registration_approved_no_user": "Registration of {{node}} was approved",
30683068
"registration_cancelled": "{{user}} cancelled a registration of {{node}}",
30693069
"registration_initiated": "{{user}} initiated a registration of {{node}}",
3070+
"registration_date_updated": "An OSF Support Team member updated the registration date of {{node}}",
30703071
"resource_identifier_added": "{{user}} has added a Resource to Registration {{node}}",
30713072
"resource_identifier_removed": "{{user}} has removed a Resource to Registration {{node}}",
30723073
"resource_identifier_updated": "{{user}} has updated a Resource to Registration {{node}}",

0 commit comments

Comments
 (0)