We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ratings don't federate
**Describe the bug**
I do follow someone on bookwyrm.social from bookwyrm.social and wyrms.de. I have seen on b.s that they rated some books without reviewing them, but those ratings do not appear on w.d. All other posts federate properly (I think).

**Expeceted behaviour**
The rating should show up on connected instances and ideally also be used on those to calculate the average rating of the book.

Here is one example that's not visible from w.d: https://bookwyrm.social/user/tastytea/reviewrating/21469

--- 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 from django.apps import apps
5 
6 from .base_activity import ActivityObject, Link
7 from .image import Document
8 
9 
10 @dataclass(init=False)
11 class Tombstone(ActivityObject):
12     """the placeholder for a deleted status"""
13 
14     type: str = "Tombstone"
15 
16     def to_model(self, *args, **kwargs):  # pylint: disable=unused-argument
17         """this should never really get serialized, just searched for"""
18         model = apps.get_model("bookwyrm.Status")
19         return model.find_existing_by_remote_id(self.id)
20 
21 
22 @dataclass(init=False)
23 class Note(ActivityObject):
24     """Note activity"""
25 
26     published: str
27     attributedTo: str
28     content: str = ""
29     to: List[str] = field(default_factory=lambda: [])
30     cc: List[str] = field(default_factory=lambda: [])
31     replies: Dict = field(default_factory=lambda: {})
32     inReplyTo: str = ""
33     summary: str = ""
34     tag: List[Link] = field(default_factory=lambda: [])
35     attachment: List[Document] = field(default_factory=lambda: [])
36     sensitive: bool = False
37     type: str = "Note"
38 
39 
40 @dataclass(init=False)
41 class Article(Note):
42     """what's an article except a note with more fields"""
43 
44     name: str
45     type: str = "Article"
46 
47 
48 @dataclass(init=False)
49 class GeneratedNote(Note):
50     """just a re-typed note"""
51 
52     type: str = "GeneratedNote"
53 
54 
55 @dataclass(init=False)
56 class Comment(Note):
57     """like a note but with a book"""
58 
59     inReplyToBook: str
60     type: str = "Comment"
61 
62 
63 @dataclass(init=False)
64 class Quotation(Comment):
65     """a quote and commentary on a book"""
66 
67     quote: str
68     type: str = "Quotation"
69 
70 
71 @dataclass(init=False)
72 class Review(Comment):
73     """a full book review"""
74 
75     name: str = None
76     rating: int = None
77     type: str = "Review"
78 
79 
80 @dataclass(init=False)
81 class Rating(Comment):
82     """just a star rating"""
83 
84     rating: int
85     content: str = None
86     type: str = "Rating"
87
```
--- 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()

```

diff --git a/bookwyrm/activitypub/note.py b/bookwyrm/activitypub/note.py
--- a/bookwyrm/activitypub/note.py
+++ b/bookwyrm/activitypub/note.py
@@ -83,4 +83,5 @@
 
     rating: int
     content: str = None
+    name: str = None  # not used, but the model inherits from Review
     type: str = "Rating"

{"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@@ -83,4 +83,5 @@\n \n     rating: int\n     content: str = None\n+    name: str = None  # not used, but the model inherits from Review\n     type: str = \"Rating\"\n", "issue": "Ratings don't federate\n**Describe the bug**\r\nI do follow someone on bookwyrm.social from bookwyrm.social and wyrms.de. I have seen on b.s that they rated some books without reviewing them, but those ratings do not appear on w.d. All other posts federate properly (I think).\r\n\r\n**Expeceted behaviour**\r\nThe rating should show up on connected instances and ideally also be used on those to calculate the average rating of the book.\r\n\r\nHere is one example that's not visible from w.d: https://bookwyrm.social/user/tastytea/reviewrating/21469\n", "before_files": [{"content": "\"\"\" note serializer and children thereof \"\"\"\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List\nfrom django.apps import apps\n\nfrom .base_activity import ActivityObject, Link\nfrom .image import Document\n\n\n@dataclass(init=False)\nclass Tombstone(ActivityObject):\n    \"\"\"the placeholder for a deleted status\"\"\"\n\n    type: str = \"Tombstone\"\n\n    def to_model(self, *args, **kwargs):  # pylint: disable=unused-argument\n        \"\"\"this should never really get serialized, just searched for\"\"\"\n        model = apps.get_model(\"bookwyrm.Status\")\n        return model.find_existing_by_remote_id(self.id)\n\n\n@dataclass(init=False)\nclass Note(ActivityObject):\n    \"\"\"Note activity\"\"\"\n\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[Document] = 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\n    name: str\n    type: str = \"Article\"\n\n\n@dataclass(init=False)\nclass GeneratedNote(Note):\n    \"\"\"just a re-typed note\"\"\"\n\n    type: str = \"GeneratedNote\"\n\n\n@dataclass(init=False)\nclass Comment(Note):\n    \"\"\"like a note but with a book\"\"\"\n\n    inReplyToBook: str\n    type: str = \"Comment\"\n\n\n@dataclass(init=False)\nclass Quotation(Comment):\n    \"\"\"a quote and commentary on a book\"\"\"\n\n    quote: str\n    type: str = \"Quotation\"\n\n\n@dataclass(init=False)\nclass Review(Comment):\n    \"\"\"a full book review\"\"\"\n\n    name: str = None\n    rating: int = None\n    type: str = \"Review\"\n\n\n@dataclass(init=False)\nclass Rating(Comment):\n    \"\"\"just a star rating\"\"\"\n\n    rating: int\n    content: str = None\n    type: str = \"Rating\"\n", "path": "bookwyrm/activitypub/note.py"}], "after_files": [{"content": "\"\"\" note serializer and children thereof \"\"\"\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List\nfrom django.apps import apps\n\nfrom .base_activity import ActivityObject, Link\nfrom .image import Document\n\n\n@dataclass(init=False)\nclass Tombstone(ActivityObject):\n    \"\"\"the placeholder for a deleted status\"\"\"\n\n    type: str = \"Tombstone\"\n\n    def to_model(self, *args, **kwargs):  # pylint: disable=unused-argument\n        \"\"\"this should never really get serialized, just searched for\"\"\"\n        model = apps.get_model(\"bookwyrm.Status\")\n        return model.find_existing_by_remote_id(self.id)\n\n\n@dataclass(init=False)\nclass Note(ActivityObject):\n    \"\"\"Note activity\"\"\"\n\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[Document] = 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\n    name: str\n    type: str = \"Article\"\n\n\n@dataclass(init=False)\nclass GeneratedNote(Note):\n    \"\"\"just a re-typed note\"\"\"\n\n    type: str = \"GeneratedNote\"\n\n\n@dataclass(init=False)\nclass Comment(Note):\n    \"\"\"like a note but with a book\"\"\"\n\n    inReplyToBook: str\n    type: str = \"Comment\"\n\n\n@dataclass(init=False)\nclass Quotation(Comment):\n    \"\"\"a quote and commentary on a book\"\"\"\n\n    quote: str\n    type: str = \"Quotation\"\n\n\n@dataclass(init=False)\nclass Review(Comment):\n    \"\"\"a full book review\"\"\"\n\n    name: str = None\n    rating: int = None\n    type: str = \"Review\"\n\n\n@dataclass(init=False)\nclass Rating(Comment):\n    \"\"\"just a star rating\"\"\"\n\n    rating: int\n    content: str = None\n    name: str = None  # not used, but the model inherits from Review\n    type: str = \"Rating\"\n", "path": "bookwyrm/activitypub/note.py"}]}