Skip to content

Add check for node build (no building in the entire branch)#966

Merged
SlimaneAmar merged 2 commits intomainfrom
add_assert_for_build
Mar 16, 2026
Merged

Add check for node build (no building in the entire branch)#966
SlimaneAmar merged 2 commits intomainfrom
add_assert_for_build

Conversation

@SlimaneAmar
Copy link
Contributor

PR Summary

@SlimaneAmar SlimaneAmar force-pushed the add_assert_for_build branch from 9d6fe98 to 299db89 Compare March 13, 2026 16:31
@SlimaneAmar SlimaneAmar force-pushed the add_assert_for_build branch from 299db89 to 51b2b7b Compare March 13, 2026 17:05

" SELECT n.id_node, n.parent_node " +
" FROM NODE n " +
" INNER JOIN NodeHierarchy nh ON n.id_node = nh.parent_node AND n.type != 'ROOT'" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does type is indexed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's unnecessary because there's no join

@Parameter(description = "nodeUuid") @PathVariable("nodeUuid") UUID nodeUuid,
@RequestHeader(HEADER_USER_ID) String userId) {
studyService.assertNoBlockedNodeInTree(nodeUuid, rootNetworkUuid);
studyService.assertCanBuildNode(rootNetworkUuid, nodeUuid);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreeing together.
Do not protect every usage of studyService.buildNode.
This fix the main user means of creation the related issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@SlimaneAmar SlimaneAmar requested a review from sBouzols March 16, 2026 16:32
@sonarqubecloud
Copy link

Copy link
Contributor

@sBouzols sBouzols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review OK
Tests OK

@SlimaneAmar SlimaneAmar merged commit 12d89cf into main Mar 16, 2026
3 checks passed
@SlimaneAmar SlimaneAmar deleted the add_assert_for_build branch March 16, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants