Skip to content

Commit

Permalink
fix(attachments): use proper attribute to retrieve URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiki committed Nov 13, 2023
1 parent c60b9a9 commit 0b09ae2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pronotepy/dataClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ def __init__(self, client: ClientBase, json_dict: dict) -> None:
self.type: int = self._resolver(int, "G") # 0 link, 1 file

if self.type == 0:
self.url = self.name
url: str | None = self._resolver(str, "url", default=None)
self.url = self.name if url is None else url
else:
padd = Padding.pad(
json.dumps({"N": self.id, "Actif": True}).replace(" ", "").encode(), 16
Expand Down

0 comments on commit 0b09ae2

Please sign in to comment.