Skip to content

Commit

Permalink
Merge github.com:DSD-DBS/polarion-rest-api-client into add-documents
Browse files Browse the repository at this point in the history
  • Loading branch information
dahbar committed Jan 2, 2024
2 parents ff93c05 + f4e5cb4 commit 03ddfa8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions polarion_rest_api_client/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ def calculate_checksum(self) -> str:
del data["checksum"]
del data["id"]

for attachment in data["attachments"]:
try:
attachment["content_bytes"] = base64.b64encode(
attachment["content_bytes"]
).decode("utf8")
except TypeError:
pass

data = dict(sorted(data.items()))

converted = json.dumps(data).encode("utf8")
Expand Down

0 comments on commit 03ddfa8

Please sign in to comment.