Repository: airavata
Updated Branches:
  refs/heads/develop 264f616ff -> 83a0bf879


fixing gateway intialization issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/83a0bf87
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/83a0bf87
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/83a0bf87

Branch: refs/heads/develop
Commit: 83a0bf8795730d712449653af1f484d9cf152d3f
Parents: 264f616
Author: scnakandala <supun.nakand...@gmail.com>
Authored: Thu Sep 22 12:54:39 2016 -0400
Committer: scnakandala <supun.nakand...@gmail.com>
Committed: Thu Sep 22 12:54:39 2016 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/resources/GatewayResource.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/83a0bf87/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
 
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
index 646594e..c745f4e 100644
--- 
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
+++ 
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
@@ -20,6 +20,7 @@
 */
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import 
org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import 
org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -461,6 +462,9 @@ public class GatewayResource extends AbstractExpCatResource 
{
             Gateway existingGateway = em.find(Gateway.class, gatewayId);
             em.close();
 
+            if(gatewayApprovalStatus == null || 
gatewayApprovalStatus.isEmpty())
+                gatewayApprovalStatus = 
GatewayApprovalStatus.APPROVED.toString();
+
             em = ExpCatResourceUtils.getEntityManager();
             em.getTransaction().begin();
             Gateway gateway = new Gateway();

Reply via email to