Skip to content

Commit

Permalink
feat: PR remark, make default path clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
pj-cegeka committed Feb 14, 2024
1 parent 34eef27 commit 1f4ca1c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public TileFragmentRelationsAttributer(FragmentRepository fragmentRepository) {
}

public void addRelationsFromRootToBottom(Fragment rootFragment, Fragment tileFragments) {
TreeRelation relationToParentFragment = tileFragments.getValueOfKey(FRAGMENT_KEY_TILE).orElse("").equals(DEFAULT_BUCKET_STRING) ? relationsAttributer.getDefaultRelation(tileFragments) : relationsAttributer.getRelationToParentFragment(tileFragments);
boolean isDefaultFragment = tileFragments.getValueOfKey(FRAGMENT_KEY_TILE).orElse("").equals(DEFAULT_BUCKET_STRING);
TreeRelation relationToParentFragment = isDefaultFragment ? relationsAttributer.getDefaultRelation(tileFragments) : relationsAttributer.getRelationToParentFragment(tileFragments);
if (!rootFragment.containsRelation(relationToParentFragment)) {
rootFragment.addRelation(relationToParentFragment);
fragmentRepository.saveFragment(rootFragment);
Expand Down

0 comments on commit 1f4ca1c

Please sign in to comment.