Skip to content

Commit

Permalink
3.0.9 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
PHKenny authored Jun 26, 2024
2 parents 5ddb8a9 + 2923fb5 commit 515ad51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.0.9

- Added different return data of Report when password is set

## 3.0.8

- New linter and formatter using ruff
Expand Down
4 changes: 4 additions & 0 deletions layrz_sdk/entities/reports/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,17 @@ def export(
if export_format == ReportFormat.MICROSOFT_EXCEL:
return self._export_xlsx(path=path, password=password, msoffice_crypt_path=msoffice_crypt_path)
elif export_format == ReportFormat.JSON:
if password:
return {'name': self.name, 'is_protected': True, 'pages': []}
return self._export_json()
else:
raise AttributeError(f'Unsupported export format: {export_format}')

if self.export_format == ReportFormat.MICROSOFT_EXCEL:
return self._export_xlsx(path=path, password=password, msoffice_crypt_path=msoffice_crypt_path)
elif self.export_format == ReportFormat.JSON:
if password:
return {'name': self.name, 'is_protected': True, 'pages': []}
return self._export_json()
else:
raise AttributeError(f'Unsupported export format: {self.export_format}')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "layrz-sdk"
version = "3.0.8"
version = "3.0.9"
description = "Layrz SDK for Python"
authors = [
{name = "Golden M, Inc.", email = "software@goldenm.com"}
Expand Down

0 comments on commit 515ad51

Please sign in to comment.