mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Fix in tag handling
This commit is contained in:
parent
54334e1667
commit
ec301051df
1 changed files with 2 additions and 2 deletions
|
@ -69,12 +69,12 @@ class Object:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tags(self) -> list[ap.RawObject]:
|
def tags(self) -> list[ap.RawObject]:
|
||||||
return self.ap_object.get("tag", [])
|
return ap.as_list(self.ap_object.get("tag", []))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def attachments(self) -> list["Attachment"]:
|
def attachments(self) -> list["Attachment"]:
|
||||||
attachments = []
|
attachments = []
|
||||||
for obj in self.ap_object.get("attachment", []):
|
for obj in ap.as_list(self.ap_object.get("attachment", [])):
|
||||||
proxied_url = proxied_media_url(obj["url"])
|
proxied_url = proxied_media_url(obj["url"])
|
||||||
attachments.append(
|
attachments.append(
|
||||||
Attachment.parse_obj(
|
Attachment.parse_obj(
|
||||||
|
|
Loading…
Reference in a new issue