Skip to content

Commit

Permalink
LPD-31933 - fixed postShipmentItemByExternalReferenceCode method
Browse files Browse the repository at this point in the history
  • Loading branch information
brbalazs authored and brianchandotcom committed Aug 21, 2024
1 parent c6278d7 commit f7671e4
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,19 +228,19 @@ public ShipmentItem postShipmentItemByExternalReferenceCode(
String externalReferenceCode, ShipmentItem shipmentItem)
throws Exception {

CommerceShipmentItem commerceShipmentItem =
_commerceShipmentItemService.
fetchCommerceShipmentItemByExternalReferenceCode(
CommerceShipment commerceShipment =
_commerceShipmentService.
fetchCommerceShipmentByExternalReferenceCode(
contextCompany.getCompanyId(), externalReferenceCode);

if (commerceShipmentItem == null) {
throw new NoSuchShipmentItemException(
"Unable to find shipment item with external reference code " +
if (commerceShipment == null) {
throw new NoSuchShipmentException(
"Unable to find shipment with external reference code " +
externalReferenceCode);
}

return postShipmentItem(
commerceShipmentItem.getCommerceShipmentId(), shipmentItem);
commerceShipment.getCommerceShipmentId(), shipmentItem);
}

@Override
Expand Down

0 comments on commit f7671e4

Please sign in to comment.