Skip to content
This repository was archived by the owner on Feb 22, 2021. It is now read-only.

Commit

Permalink
EBL-423:fix edit blocker functionally no to reset the json configurat…
Browse files Browse the repository at this point in the history
…ion of the blocker (#489)


* EBL-423: fix edit of Single Region Blocker
  • Loading branch information
Maor Shapira authored Feb 15, 2021
1 parent 4825c2c commit 70247cb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,15 @@ public void updateBlockerDefinition(int id, String name, Integer environmentId,
blockerDefinition.setStackId(stackId);
blockerDefinition.setAvailability(availability);
blockerDefinition.setBlockerTypeName(blockerTypeName);
blockerDefinition.setBlockerJsonConfiguration(blockerJsonConfiguration);
blockerDefinition.setActive(isActive);

if (blockerTypeName.equals(BlockerTypeName.SINGLE_REGION)) {
blockerJsonConfiguration = initSingleRegionBlockerJsonConfig(environmentId, serviceId, stackId, availability, blockerJsonConfiguration, req);
if (blockerJsonConfiguration == null) return;
}

blockerDefinition.setBlockerJsonConfiguration(blockerJsonConfiguration);

blockerDefinitionDao.updateBlockerDefinition(blockerDefinition);
logger.info(String.format("Updated blocker: blockerId - %s, blockerName - %s, active - %s", blockerDefinition.getId(), blockerDefinition.getName(), blockerDefinition.getActive()));
assignJsonResponseToReq(req, HttpStatus.OK, blockerDefinition);
Expand Down

0 comments on commit 70247cb

Please sign in to comment.