diff options
author | xg353y <xg353y@intl.att.com> | 2019-03-15 15:06:25 +0100 |
---|---|---|
committer | xg353y <xg353y@intl.att.com> | 2019-03-15 16:17:53 +0100 |
commit | 7fc8fd594dddbd079fcb8419f658e08620eb38c7 (patch) | |
tree | ad4e98e197943668d305bcc265e46ed61d89b161 /src/main/java | |
parent | 2e4242e58dbc659e11df212115b9c8827d548167 (diff) |
Rework UI
Fix bugs due to the data model change
Issue-ID: CLAMP-318
Change-Id: If3750505a5f496caae61c01c2179e058e79eba52
Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java b/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java index c316f1f5..ee9ba537 100644 --- a/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java +++ b/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java @@ -57,6 +57,7 @@ public class MicroservicePolicyService implements PolicyService<MicroServicePoli return repository.existsById(policyName); } + @Transactional public MicroServicePolicy getAndUpdateMicroServicePolicy(Loop loop, MicroServicePolicy policy) { return repository.findById(policy.getName()).map(p -> updateMicroservicePolicyProperties(p, policy, loop)) .orElse(new MicroServicePolicy(policy.getName(), policy.getPolicyTosca(), policy.getShared(), @@ -65,7 +66,7 @@ public class MicroservicePolicyService implements PolicyService<MicroServicePoli private MicroServicePolicy updateMicroservicePolicyProperties(MicroServicePolicy oldPolicy, MicroServicePolicy newPolicy, Loop loop) { - oldPolicy.setJsonRepresentation(newPolicy.getJsonRepresentation()); + oldPolicy.setProperties(newPolicy.getProperties()); if (oldPolicy.getUsedByLoops().contains(loop)) { oldPolicy.getUsedByLoops().add(loop); } |