Skip to content

Commit

Permalink
avniproject/avni-webapp#1288 | avoid using ChecklistItemDetailBuilder…
Browse files Browse the repository at this point in the history
… to set Lead ChecklistItemDetail
  • Loading branch information
himeshr committed Jul 24, 2024
1 parent fde707d commit 0ecc274
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ public ChecklistDetailBuilder withItems(List<ChecklistItemDetailRequest> items)
builtItems.put(builtItemDetail.getUuid(), builtItemDetail);
});
//set dependentOn after all items in request have been processed so order of items in request does not matter for dependents
items.forEach(item -> new ChecklistItemDetailBuilder(this.get(), getExistingChecklistItemDetail(this.get(), item))
.withLeadItem(builtItems.get(item.getDependentOn()))
.build());
items.forEach(item -> getExistingChecklistItemDetail(this.get(), item).setLeadChecklistItemDetail(builtItems.get(item.getDependentOn())));
return this;
}

Expand Down

0 comments on commit 0ecc274

Please sign in to comment.