fix for empty list of profiles
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@130662 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
eabefd3db0
commit
3b3bc51224
|
@ -1072,7 +1072,7 @@ public class CreateDatasetForm extends Composite{
|
|||
* @return
|
||||
*/
|
||||
private boolean checkSelectedMetaDataProfile() {
|
||||
return metadataProfilesFormatListbox.getSelectedItemText().equals("none");
|
||||
return metadataProfilesFormatListbox.getSelectedItemText().equals("none") && (metadataProfilesFormatListbox.getItemCount() == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -546,7 +546,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
|||
@Override
|
||||
public List<MetaDataProfileBean> getProfiles(String orgName) {
|
||||
|
||||
List<MetaDataProfileBean> toReturn = null;
|
||||
List<MetaDataProfileBean> toReturn = new ArrayList<MetaDataProfileBean>();
|
||||
try{
|
||||
toReturn = Utils.getMetadataProfilesList(Utils.retrieveScopeFromOrganizationName(orgName), getThreadLocalRequest().getSession(), getASLSession(), CKAN_PROFILES_KEY);
|
||||
}catch(Exception e){
|
||||
|
|
Loading…
Reference in New Issue