Skip to content

Commit

Permalink
fix(attachments): use proper attribute to retrieve URLs (#286)
Browse files Browse the repository at this point in the history
* fix(attachments): use proper attribute to retrieve URLs

* correct typing

---------

Co-authored-by: bain3 <31798786+bain3@users.noreply.github.com>
  • Loading branch information
delphiki and bain3 authored Nov 19, 2023
1 parent 0240969 commit 6414888
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 = self._resolver(str, "url", default=None)
self.url: str = 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 6414888

Please sign in to comment.