prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Rate stars don't work
  You should be able to click to give a star rating to a book on the book page, it doesn't do anything.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `bookwyrm/activitypub/note.py`
  Content:
  ```
  1 ''' note serializer and children thereof '''
  2 from dataclasses import dataclass, field
  3 from typing import Dict, List
  4 
  5 from .base_activity import ActivityObject, Link
  6 from .image import Image
  7 
  8 @dataclass(init=False)
  9 class Tombstone(ActivityObject):
  10     ''' the placeholder for a deleted status '''
  11     published: str
  12     deleted: str
  13     type: str = 'Tombstone'
  14 
  15 
  16 @dataclass(init=False)
  17 class Note(ActivityObject):
  18     ''' Note activity '''
  19     published: str
  20     attributedTo: str
  21     content: str
  22     to: List[str] = field(default_factory=lambda: [])
  23     cc: List[str] = field(default_factory=lambda: [])
  24     replies: Dict = field(default_factory=lambda: {})
  25     inReplyTo: str = ''
  26     summary: str = ''
  27     tag: List[Link] = field(default_factory=lambda: [])
  28     attachment: List[Image] = field(default_factory=lambda: [])
  29     sensitive: bool = False
  30     type: str = 'Note'
  31 
  32 
  33 @dataclass(init=False)
  34 class Article(Note):
  35     ''' what's an article except a note with more fields '''
  36     name: str
  37     type: str = 'Article'
  38 
  39 
  40 @dataclass(init=False)
  41 class GeneratedNote(Note):
  42     ''' just a re-typed note '''
  43     type: str = 'GeneratedNote'
  44 
  45 
  46 @dataclass(init=False)
  47 class Comment(Note):
  48     ''' like a note but with a book '''
  49     inReplyToBook: str
  50     type: str = 'Comment'
  51 
  52 
  53 @dataclass(init=False)
  54 class Review(Comment):
  55     ''' a full book review '''
  56     name: str
  57     rating: int = None
  58     type: str = 'Review'
  59 
  60 
  61 @dataclass(init=False)
  62 class Quotation(Comment):
  63     ''' a quote and commentary on a book '''
  64     quote: str
  65     type: str = 'Quotation'
  66
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/bookwyrm/activitypub/note.py b/bookwyrm/activitypub/note.py
  --- a/bookwyrm/activitypub/note.py
  +++ b/bookwyrm/activitypub/note.py
  @@ -53,7 +53,7 @@
   @dataclass(init=False)
   class Review(Comment):
       ''' a full book review '''
  -    name: str
  +    name: str = None
       rating: int = None
       type: str = 'Review'
  
verification_info: {"golden_diff": "diff --git a/bookwyrm/activitypub/note.py b/bookwyrm/activitypub/note.py\n--- a/bookwyrm/activitypub/note.py\n+++ b/bookwyrm/activitypub/note.py\n@@ -53,7 +53,7 @@\n @dataclass(init=False)\n class Review(Comment):\n     ''' a full book review '''\n-    name: str\n+    name: str = None\n     rating: int = None\n     type: str = 'Review'\n", "issue": "Rate stars don't work\nYou should be able to click to give a star rating to a book on the book page, it doesn't do anything.\n", "before_files": [{"content": "''' note serializer and children thereof '''\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List\n\nfrom .base_activity import ActivityObject, Link\nfrom .image import Image\n\n@dataclass(init=False)\nclass Tombstone(ActivityObject):\n    ''' the placeholder for a deleted status '''\n    published: str\n    deleted: str\n    type: str = 'Tombstone'\n\n\n@dataclass(init=False)\nclass Note(ActivityObject):\n    ''' Note activity '''\n    published: str\n    attributedTo: str\n    content: str\n    to: List[str] = field(default_factory=lambda: [])\n    cc: List[str] = field(default_factory=lambda: [])\n    replies: Dict = field(default_factory=lambda: {})\n    inReplyTo: str = ''\n    summary: str = ''\n    tag: List[Link] = field(default_factory=lambda: [])\n    attachment: List[Image] = field(default_factory=lambda: [])\n    sensitive: bool = False\n    type: str = 'Note'\n\n\n@dataclass(init=False)\nclass Article(Note):\n    ''' what's an article except a note with more fields '''\n    name: str\n    type: str = 'Article'\n\n\n@dataclass(init=False)\nclass GeneratedNote(Note):\n    ''' just a re-typed note '''\n    type: str = 'GeneratedNote'\n\n\n@dataclass(init=False)\nclass Comment(Note):\n    ''' like a note but with a book '''\n    inReplyToBook: str\n    type: str = 'Comment'\n\n\n@dataclass(init=False)\nclass Review(Comment):\n    ''' a full book review '''\n    name: str\n    rating: int = None\n    type: str = 'Review'\n\n\n@dataclass(init=False)\nclass Quotation(Comment):\n    ''' a quote and commentary on a book '''\n    quote: str\n    type: str = 'Quotation'\n", "path": "bookwyrm/activitypub/note.py"}], "after_files": [{"content": "''' note serializer and children thereof '''\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List\n\nfrom .base_activity import ActivityObject, Link\nfrom .image import Image\n\n@dataclass(init=False)\nclass Tombstone(ActivityObject):\n    ''' the placeholder for a deleted status '''\n    published: str\n    deleted: str\n    type: str = 'Tombstone'\n\n\n@dataclass(init=False)\nclass Note(ActivityObject):\n    ''' Note activity '''\n    published: str\n    attributedTo: str\n    content: str\n    to: List[str] = field(default_factory=lambda: [])\n    cc: List[str] = field(default_factory=lambda: [])\n    replies: Dict = field(default_factory=lambda: {})\n    inReplyTo: str = ''\n    summary: str = ''\n    tag: List[Link] = field(default_factory=lambda: [])\n    attachment: List[Image] = field(default_factory=lambda: [])\n    sensitive: bool = False\n    type: str = 'Note'\n\n\n@dataclass(init=False)\nclass Article(Note):\n    ''' what's an article except a note with more fields '''\n    name: str\n    type: str = 'Article'\n\n\n@dataclass(init=False)\nclass GeneratedNote(Note):\n    ''' just a re-typed note '''\n    type: str = 'GeneratedNote'\n\n\n@dataclass(init=False)\nclass Comment(Note):\n    ''' like a note but with a book '''\n    inReplyToBook: str\n    type: str = 'Comment'\n\n\n@dataclass(init=False)\nclass Review(Comment):\n    ''' a full book review '''\n    name: str = None\n    rating: int = None\n    type: str = 'Review'\n\n\n@dataclass(init=False)\nclass Quotation(Comment):\n    ''' a quote and commentary on a book '''\n    quote: str\n    type: str = 'Quotation'\n", "path": "bookwyrm/activitypub/note.py"}]}