mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 04:23:04 +00:00
Merge pull request #1239 from atmire/Fix-hardcoded-submission-section-IDs
Fix hardcoded submission section IDs
This commit is contained in:
@@ -288,14 +288,13 @@ export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit {
|
||||
this.pathCombiner.subRootElement);
|
||||
})
|
||||
).subscribe((result: SubmissionObject[]) => {
|
||||
if (result[0].sections.upload) {
|
||||
Object.keys((result[0].sections.upload as WorkspaceitemSectionUploadObject).files)
|
||||
.filter((key) => (result[0].sections.upload as WorkspaceitemSectionUploadObject).files[key].uuid === this.fileId)
|
||||
if (result[0].sections[this.sectionId]) {
|
||||
const uploadSection = (result[0].sections[this.sectionId] as WorkspaceitemSectionUploadObject);
|
||||
Object.keys(uploadSection.files)
|
||||
.filter((key) => uploadSection.files[key].uuid === this.fileId)
|
||||
.forEach((key) => this.uploadService.updateFileData(
|
||||
this.submissionId,
|
||||
this.sectionId,
|
||||
this.fileId,
|
||||
(result[0].sections.upload as WorkspaceitemSectionUploadObject).files[key]));
|
||||
this.submissionId, this.sectionId, this.fileId, uploadSection.files[key])
|
||||
);
|
||||
}
|
||||
this.switchMode();
|
||||
}));
|
||||
|
Reference in New Issue
Block a user