mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Merge pull request #2132 from md1222/edit-bitstream
Fixed: Clear metadata if value has not set. Reference issue no #1612
This commit is contained in:
@@ -618,7 +618,11 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
|
|||||||
// TODO: Set bitstream to primary when supported
|
// TODO: Set bitstream to primary when supported
|
||||||
const primary = rawForm.fileNamePrimaryContainer.primaryBitstream;
|
const primary = rawForm.fileNamePrimaryContainer.primaryBitstream;
|
||||||
Metadata.setFirstValue(newMetadata, 'dc.title', rawForm.fileNamePrimaryContainer.fileName);
|
Metadata.setFirstValue(newMetadata, 'dc.title', rawForm.fileNamePrimaryContainer.fileName);
|
||||||
|
if (isEmpty(rawForm.descriptionContainer.description)) {
|
||||||
|
delete newMetadata['dc.description'];
|
||||||
|
} else {
|
||||||
Metadata.setFirstValue(newMetadata, 'dc.description', rawForm.descriptionContainer.description);
|
Metadata.setFirstValue(newMetadata, 'dc.description', rawForm.descriptionContainer.description);
|
||||||
|
}
|
||||||
if (this.isIIIF) {
|
if (this.isIIIF) {
|
||||||
// It's helpful to remove these metadata elements entirely when the form value is empty.
|
// It's helpful to remove these metadata elements entirely when the form value is empty.
|
||||||
// This avoids potential issues on the REST side and makes it possible to do things like
|
// This avoids potential issues on the REST side and makes it possible to do things like
|
||||||
|
Reference in New Issue
Block a user