-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Describe the bug
Inside the CellService the method generate_enable_sandbox_ti has an if clause if self._rest.sandboxing_disabled.
The property sandboxing_disabled from the RestService is either string or a response object from GET("/ActiveConfiguration/Administration/DisableSandboxing/$value"). But the response itself in this case doesn't matter. The if clause evaluates to True every time regardless of the server response. Since the code only check if a response object is present/set and doesn't check for the response code/text.
So in this case the code always thinks the sandboxing is disabled.
To Reproduce
Call for example cells.clear_with_mdx(sandbox_name="my_sandbox") (with enabled sandboxing on the server). In this case the sandbox will not be used.
Expected behavior
The if clause should be evaluated against the server response and not just the object presence itself. So the function call to cells.clear_with_mdx(sandbox_name="my_sandbox") should use a sandbox.
Version
TM1py [2.1]
TM1 Server Version: [11.8.03200.3]