diff --git a/openbis_ng_ui/src/components/types/objectType/ObjectType.jsx b/openbis_ng_ui/src/components/types/objectType/ObjectType.jsx index 1c2def4980378b6426e8bc47f16e84f18fff7035..edafa1d119ebed6936f709822d13e7f2875a67ed 100644 --- a/openbis_ng_ui/src/components/types/objectType/ObjectType.jsx +++ b/openbis_ng_ui/src/components/types/objectType/ObjectType.jsx @@ -212,7 +212,7 @@ class ObjectType extends React.Component { let newProperties = this.state.objectType.properties.map(property => { let errors = {} - if(!_.trim(property.type)){ + if(!property.propertyType){ errors['propertyType'] = 'Cannot be empty' } diff --git a/openbis_ng_ui/src/components/types/objectType/ObjectTypePropertyRow.jsx b/openbis_ng_ui/src/components/types/objectType/ObjectTypePropertyRow.jsx index a2e582d2ec1816c7daaa714e047c5f4e7fd19c52..d1ce770022af8c5b1adebfc9993c9d4ec67eb233 100644 --- a/openbis_ng_ui/src/components/types/objectType/ObjectTypePropertyRow.jsx +++ b/openbis_ng_ui/src/components/types/objectType/ObjectTypePropertyRow.jsx @@ -132,13 +132,16 @@ class ObjectTypeTableRow extends React.Component { renderPreview(){ const {property, propertyTypes} = this.props - const propertyType = _.find(propertyTypes, propertyType => { - return propertyType.code === property.propertyType.code - }) - - return ( - <ObjectTypePropertyPreview property={property} propertyType={propertyType} /> - ) + if(property.propertyType){ + const propertyType = _.find(propertyTypes, propertyType => { + return propertyType.code === property.propertyType.code + }) + return ( + <ObjectTypePropertyPreview property={property} propertyType={propertyType} /> + ) + }else{ + return (<div></div>) + } } renderPropertyType(){