Skip to content

Commit

Permalink
Fix order completion logic in OrganisasjonBestillingService
Browse files Browse the repository at this point in the history
#deploy-test-dolly-backend

The previous logic incorrectly assumed orders with empty status lists were completed. This change ensures an order is only marked as completed if the status list is not empty and all statuses indicate completion.
  • Loading branch information
krharum committed Sep 16, 2024
1 parent 364cfbc commit 2fba5fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private void updateBestilling(OrganisasjonBestilling bestilling, List<OrgStatus>

bestilling.setFeil(feil);

var ferdig = orgStatus.stream()
var ferdig = !orgStatus.isEmpty() && orgStatus.stream()
.allMatch(o -> DEPLOY_ENDED_STATUS_LIST.stream()
.anyMatch(status -> status.equals(o.getStatus()))) &&
Arrays.stream(bestilling.getMiljoer().split(","))
Expand Down

0 comments on commit 2fba5fb

Please sign in to comment.