Skip to content

Commit c80fd37

Browse files
authored
Merge pull request #988 from hkad98/jkd/fix-pdf-export
fix: export_pdf failed without metadata
2 parents 95d23e0 + c5e6734 commit c80fd37

File tree

1 file changed

+4
-1
lines changed
  • gooddata-sdk/gooddata_sdk/catalog/export

1 file changed

+4
-1
lines changed

gooddata-sdk/gooddata_sdk/catalog/export/service.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ def export_pdf(
214214
if not self._dashboard_id_exists(workspace_id, dashboard_id):
215215
raise ValueError(f"Dashboard id '{dashboard_id}' does not exist for workspace '{workspace_id}'.")
216216
store_path = store_path if isinstance(store_path, Path) else Path(store_path)
217-
request = VisualExportRequest(dashboard_id=dashboard_id, file_name=file_name, metadata=metadata)
217+
if metadata is None:
218+
request = VisualExportRequest(dashboard_id=dashboard_id, file_name=file_name)
219+
else:
220+
request = VisualExportRequest(dashboard_id=dashboard_id, file_name=file_name, metadata=metadata)
218221
file_path = store_path / f"{file_name}.pdf"
219222
create_func = self._actions_api.create_pdf_export
220223
get_func = self._actions_api.get_exported_file

0 commit comments

Comments
 (0)