File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ def __init__(
9999 self ._readonly = readonly
100100 self ._show_diffs = show_diffs
101101
102+ # Check that the report is in the PBIR format.
103+ response = _base_api (request = f"/v1.0/myorg/groups/{ self ._workspace_id } /reports/{ self ._report_id } " , client = "fabric_sp" )
104+ self .format = response .json ().get ('format' )
105+
102106 result = _base_api (
103107 request = f"/v1/workspaces/{ self ._workspace_id } /items/{ self ._report_id } /getDefinition" ,
104108 method = "post" ,
@@ -111,10 +115,6 @@ def __init__(
111115
112116 # Check that the report is in the PBIR format
113117 parts = result .get ("definition" , {}).get ("parts" , [])
114- if self ._report_file_path not in [p .get ("path" ) for p in parts ]:
115- self .format = "PBIR-Legacy"
116- else :
117- self .format = "PBIR"
118118 self ._report_definition = {"parts" : []}
119119 for part in parts :
120120 path = part .get ("path" )
You can’t perform that action at this time.
0 commit comments