Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-no committed May 19, 2022
1 parent cb4d507 commit 967e537
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public ResponseEntity<Boolean> publishProductOrder(
for(OrderItem orderItem : orderItems) {
ProductOffering po = rsocClient.getPoById(URI.create(orderItem.getProductOffering().getHref()));
try {
serviceLevelAgreements.add(slaClient.getSLAById(URI.create(po.getServiceLevelAgreement().getHref())));
if(po.getServiceLevelAgreement() != null)
serviceLevelAgreements.add(slaClient.getSLAById(URI.create(po.getServiceLevelAgreement().getHref())));
} catch (ServiceLevelAgreementNotFoundException ignored) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}
Expand Down

0 comments on commit 967e537

Please sign in to comment.