minor fix when custom fields are created
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@131361 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c393e798b2
commit
095bbe77d7
|
@ -724,14 +724,14 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
// prepare custom fields
|
// prepare custom fields
|
||||||
for (MetaDataFieldSkeleton field : listOfMetadataFields) {
|
for (MetaDataFieldSkeleton field : listOfMetadataFields) {
|
||||||
|
|
||||||
MetadataFieldWrapper originalField = field.getField();
|
MetadataFieldWrapper originalField = field.getField();
|
||||||
|
|
||||||
String value = originalField.getType().equals(DataType.Time_Interval) || originalField.getType().equals(DataType.Times_ListOf) ?
|
String value = originalField.getType().equals(DataType.Time_Interval) || originalField.getType().equals(DataType.Times_ListOf) ?
|
||||||
field.getTimeIntervalOrTimeListWithoutMissing() : field.getFieldCurrentValue();
|
field.getTimeIntervalOrTimeListWithoutMissing() : field.getFieldCurrentValue();
|
||||||
|
|
||||||
if(!value.isEmpty())
|
if(!value.isEmpty())
|
||||||
customFieldsMap.put(field.getFieldName(), field.getFieldCurrentValue());
|
customFieldsMap.put(field.getFieldName(), field.getFieldCurrentValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,7 +739,8 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
String key = customEntry.getKey();
|
String key = customEntry.getKey();
|
||||||
String value = customEntry.getValue();
|
String value = customEntry.getValue();
|
||||||
customFieldsMap.put(key, value);
|
if(value != null && !value.isEmpty())
|
||||||
|
customFieldsMap.put(key, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue