MicroStrategy / mstrio-py

Python integration for MicroStrategy
Apache License 2.0
90 stars 60 forks source link

list_attributes fails to get all Attribute properties unless the project_id is set on the connection #203

Open hustontrevor opened 2 days ago

hustontrevor commented 2 days ago

May affect many other lists or Object collection methods

This fails on the ancestors. Debugging shows the ancestors list to have an error about the object not existing in the metadata

mstr_conn = Connection(base_url=my_base_url , username=my_username, password=my_password, ssl_verify=False)
my_project_id = '<a valid project id>'
attributes_list = list_attributes(connection=mstr_conn,project_id=my_project_id)
for a in attributes_list :
    if a.ancestors[1]['name'] != "System Objects":

The problem goes away if you set the project directly, but then what is the point of the project_id being in the list_attributes parameters? mstr_conn.select_project(project_id=my_project_id)

hustontrevor commented 2 days ago

(11.4.9.101)