airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [41/50] [abbrv] airavata git commit: fixing gateway intialization issue
Date Thu, 29 Sep 2016 12:45:18 GMT
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/lahiru/AIRAVATA-2065
Commit: 83a0bf8795730d712449653af1f484d9cf152d3f
Parents: 264f616
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Thu Sep 22 12:54:39 2016 -0400
Committer: scnakandala <supun.nakandala@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();


Mime
View raw message