mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Fixes default lists on activitypub dataclasses
This commit is contained in:
parent
641ac22786
commit
9b57cfd331
4 changed files with 6 additions and 6 deletions
|
@ -25,7 +25,7 @@ class Book(ActivityObject):
|
|||
librarything_key: str
|
||||
goodreads_key: str
|
||||
|
||||
attachment: List[Image] = field(default=lambda: [])
|
||||
attachment: List[Image] = field(default_factory=lambda: [])
|
||||
type: str = 'Book'
|
||||
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ class Note(ActivityObject):
|
|||
cc: List[str]
|
||||
content: str
|
||||
replies: Dict
|
||||
tag: List[Link] = field(default=lambda: [])
|
||||
attachment: List[Image] = field(default=lambda: [])
|
||||
tag: List[Link] = field(default_factory=lambda: [])
|
||||
attachment: List[Image] = field(default_factory=lambda: [])
|
||||
sensitive: bool = False
|
||||
type: str = 'Note'
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class Person(ActivityObject):
|
|||
summary: str
|
||||
publicKey: PublicKey
|
||||
endpoints: Dict
|
||||
icon: Image = field(default=lambda: {})
|
||||
icon: Image = field(default_factory=lambda: {})
|
||||
bookwyrmUser: bool = False
|
||||
manuallyApprovesFollowers: str = False
|
||||
discoverable: str = True
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
"mediaType": "image//images/covers/2b4e4712-5a4d-4ac1-9df4-634cc9c7aff3jpg",
|
||||
"url": "https://example.com/images/covers/2b4e4712-5a4d-4ac1-9df4-634cc9c7aff3jpg",
|
||||
"name": "Cover of \"This Is How You Lose the Time War\""
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
"replies": {
|
||||
"id": "https://example.com/user/mouse/quotation/13/replies",
|
||||
"type": "Collection",
|
||||
|
|
Loading…
Reference in a new issue