Invalid return type in function declaration publish in OlapCube module
Closed this issue · 2 comments
pawelgnatowski commented
mstrio.py (11.3.9.103)
from mstrio.project_objects.datasets import OlapCube
There is an error in mstrio - return Type for the publish cube function is set to None while in fact it does return response.json , which according to our rest api docs
/api/v2/cubes/{cube_id}
should return {id:str,jobId:str} .
def publish(self) -> **None <=== here it is:**
"""Publish an OLAP Cube. Request to publish an OLAP Cube is an
asynchronous operation, so the result of it can be seen after calling
method `refresh_status()` inherited from Cube class.
Returns:
A dictionary with two keys identifying task IDs.
"""
response = cubes.publish(self._connection, self._id)
logger.info(f"Request for publishing cube '{self.name}' was sent.")
**return response.json()**
urszulajaczewska commented
Hi @pawelgnatowski, We'll log the defect and fix annotation so that return type is correct. I'll update this issue when the changes are released.
mgorskiMicroStrategy commented
@pawelgnatowski It's already fixed in mstrio-py 11.3.11.101.