We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Event registration member serializer should be read only
### Describe the bug
https://github.com/svthalia/concrexit/blob/4ab37961f50e398cc52422cdc1df66f6ab8ff2ee/website/events/api/v2/serializers/event_registration.py#L34 This serializer should be read-only

### How to reproduce
https://staging.thalia.nu/api/v2/events/150/registrations/ shows that you can POST to update the member profile, that should not be the case

### Expected behaviour
Be read only


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `website/events/api/v2/serializers/event_registration.py`
Content:
```
1 from rest_framework import serializers
2 
3 from events.models import EventRegistration
4 from members.api.v2.serializers.member import MemberSerializer
5 
6 
7 class EventRegistrationSerializer(serializers.ModelSerializer):
8     """Serializer for event registrations."""
9 
10     def __init__(self, *args, **kwargs):
11         # Don't pass the 'fields' arg up to the superclass
12         fields = kwargs.pop("fields", {"pk", "member", "name"})
13 
14         # Instantiate the superclass normally
15         super().__init__(*args, **kwargs)
16 
17         allowed = set(fields)
18         existing = set(self.fields.keys())
19         for field_name in existing - allowed:
20             self.fields.pop(field_name)
21 
22     class Meta:
23         model = EventRegistration
24         fields = (
25             "pk",
26             "present",
27             "queue_position",
28             "date",
29             "payment",
30             "member",
31             "name",
32         )
33 
34     member = MemberSerializer(detailed=False)
35
```
--- 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/website/events/api/v2/serializers/event_registration.py b/website/events/api/v2/serializers/event_registration.py
--- a/website/events/api/v2/serializers/event_registration.py
+++ b/website/events/api/v2/serializers/event_registration.py
@@ -31,4 +31,4 @@
             "name",
         )
 
-    member = MemberSerializer(detailed=False)
+    member = MemberSerializer(detailed=False, read_only=True)

{"golden_diff": "diff --git a/website/events/api/v2/serializers/event_registration.py b/website/events/api/v2/serializers/event_registration.py\n--- a/website/events/api/v2/serializers/event_registration.py\n+++ b/website/events/api/v2/serializers/event_registration.py\n@@ -31,4 +31,4 @@\n             \"name\",\n         )\n \n-    member = MemberSerializer(detailed=False)\n+    member = MemberSerializer(detailed=False, read_only=True)\n", "issue": "Event registration member serializer should be read only\n### Describe the bug\r\nhttps://github.com/svthalia/concrexit/blob/4ab37961f50e398cc52422cdc1df66f6ab8ff2ee/website/events/api/v2/serializers/event_registration.py#L34 This serializer should be read-only\r\n\r\n### How to reproduce\r\nhttps://staging.thalia.nu/api/v2/events/150/registrations/ shows that you can POST to update the member profile, that should not be the case\r\n\r\n### Expected behaviour\r\nBe read only\r\n\n", "before_files": [{"content": "from rest_framework import serializers\n\nfrom events.models import EventRegistration\nfrom members.api.v2.serializers.member import MemberSerializer\n\n\nclass EventRegistrationSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer for event registrations.\"\"\"\n\n    def __init__(self, *args, **kwargs):\n        # Don't pass the 'fields' arg up to the superclass\n        fields = kwargs.pop(\"fields\", {\"pk\", \"member\", \"name\"})\n\n        # Instantiate the superclass normally\n        super().__init__(*args, **kwargs)\n\n        allowed = set(fields)\n        existing = set(self.fields.keys())\n        for field_name in existing - allowed:\n            self.fields.pop(field_name)\n\n    class Meta:\n        model = EventRegistration\n        fields = (\n            \"pk\",\n            \"present\",\n            \"queue_position\",\n            \"date\",\n            \"payment\",\n            \"member\",\n            \"name\",\n        )\n\n    member = MemberSerializer(detailed=False)\n", "path": "website/events/api/v2/serializers/event_registration.py"}], "after_files": [{"content": "from rest_framework import serializers\n\nfrom events.models import EventRegistration\nfrom members.api.v2.serializers.member import MemberSerializer\n\n\nclass EventRegistrationSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer for event registrations.\"\"\"\n\n    def __init__(self, *args, **kwargs):\n        # Don't pass the 'fields' arg up to the superclass\n        fields = kwargs.pop(\"fields\", {\"pk\", \"member\", \"name\"})\n\n        # Instantiate the superclass normally\n        super().__init__(*args, **kwargs)\n\n        allowed = set(fields)\n        existing = set(self.fields.keys())\n        for field_name in existing - allowed:\n            self.fields.pop(field_name)\n\n    class Meta:\n        model = EventRegistration\n        fields = (\n            \"pk\",\n            \"present\",\n            \"queue_position\",\n            \"date\",\n            \"payment\",\n            \"member\",\n            \"name\",\n        )\n\n    member = MemberSerializer(detailed=False, read_only=True)\n", "path": "website/events/api/v2/serializers/event_registration.py"}]}