added check on organization existence
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@141886 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7080f55c9e
commit
911a1b976f
|
@ -33,5 +33,6 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-1.2.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -41,7 +41,8 @@ public class AddUserToOrganizationThread extends Thread {
|
|||
Set<Entry<String, String>> entrySet = orgAndCapacity.entrySet();
|
||||
for (Entry<String, String> entry : entrySet) {
|
||||
|
||||
instance.checkRoleIntoOrganization(username, entry.getKey(), RolesCkanGroupOrOrg.convertFromCapacity(entry.getValue()));
|
||||
if(instance.getOrganizationByName(entry.getKey()) != null)
|
||||
instance.checkRoleIntoOrganization(username, entry.getKey(), RolesCkanGroupOrOrg.convertFromCapacity(entry.getValue()));
|
||||
|
||||
}
|
||||
logger.debug("Thread for role association ended");
|
||||
|
|
Loading…
Reference in New Issue