Skip to content

Conversation

@Cubewise-JoeCHK
Copy link
Contributor

close #1283

@MariusWirtz
Copy link
Collaborator

Good catch. Thank you @Cubewise-JoeCHK

Please add a test case that covers the case described in #1283

@MariusWirtz MariusWirtz requested a review from Copilot October 1, 2025 13:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the hierarchical element traversal where the leaves_only parameter was not being passed through to recursive calls, causing inconsistent behavior when retrieving descendants with leaf-only filtering enabled.

  • Fixed the get_descendants method to properly pass the leaves_only parameter in recursive calls
  • Added a comprehensive test case to verify the fix works correctly with multi-level hierarchical consolidations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
TM1py/Objects/Hierarchy.py Fixed the recursive call to pass the leaves_only parameter
Tests/Hierarchy_test.py Added test case to verify the fix with complex hierarchical structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MariusWirtz MariusWirtz merged commit b432873 into cubewise-code:master Oct 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

Tests completed for environment: tm1-11-cloud. Check artifacts for details.

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.

hier function: get_descendants cannot return the right elements if parameter set leaves_only=True

2 participants