Skip to content
Snippets Groups Projects
Commit 2d0a6754 authored by Nicolas.Rod's avatar Nicolas.Rod Committed by Florent POITTEVIN
Browse files

fix: correctly check if custom formly form exists before saving deposit

parent c3be36aa
No related branches found
No related tags found
1 merge request!192feat: DLCM-1205 integrate formly library to deposit
......@@ -55,10 +55,9 @@ import {
import {
DateUtil,
isEmptyArray,
isNonEmptyString,
isNotNullNorUndefined,
isNullOrUndefined,
KeyValue,
KeyValue, MappingObjectUtil,
PropertyName,
ResourceNameSpace,
SolidifyValidator,
......@@ -239,8 +238,10 @@ export class DepositFormPresentational extends SharedAbstractFormPresentational<
deposit.collectionBegin = DateUtil.convertToOffsetDateTimeIso8601(deposit.collectionBegin);
deposit.collectionEnd = DateUtil.convertToOffsetDateTimeIso8601(deposit.collectionEnd);
deposit.collectionEnd = DateUtil.convertToOffsetDateTimeIso8601(deposit.collectionEnd);
if (isNotNullNorUndefined(this.formFormly.value) && isNonEmptyString(this.formFormly.value)) {
if (isNotNullNorUndefined(this.formFormly.value) && MappingObjectUtil.size(this.formFormly.value) > 0) {
deposit.customMetadata = JSON.stringify(this.formFormly.value);
} else {
deposit.customMetadata = null;
}
return deposit;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment