From 0061f78ca71a5744146e97dc017c4dfc7391f861 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 4 Nov 2024 10:31:47 +0200 Subject: [PATCH] fixed issue 235 --- src/sempy_labs/report/_reportwrapper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sempy_labs/report/_reportwrapper.py b/src/sempy_labs/report/_reportwrapper.py index f20bffce..3d1e81ed 100644 --- a/src/sempy_labs/report/_reportwrapper.py +++ b/src/sempy_labs/report/_reportwrapper.py @@ -1332,6 +1332,7 @@ def set_theme(self, theme_file_path: str): theme_name = json_file["name"] theme_name_full = f"{theme_name}.json" + rd = self.rdef # Add theme.json file to request_body file_payload = _conv_b64(json_file) @@ -1345,11 +1346,12 @@ def set_theme(self, theme_file_path: str): "type": "CustomTheme", } - rd = self.rdef for _, r in rd.iterrows(): path = r["path"] payload = r["payload"] - if path != report_path: + if path == filePath: + pass + elif path != report_path: _add_part(request_body, path, payload) # Update the report.json file else: