We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
/related_project/ issue
Attempted to POST the following data:
{"relation":"1","project":"8012","related_iati_id":"23232"}

The response is 400:
`related_project: ["This field is required."]`

However, we want to allow a selection of external project:
<img width="1440" alt="Screenshot 2019-08-16 10 16 11" src="https://user-images.githubusercontent.com/1336477/63150230-effe3400-c00e-11e9-8aff-dc162686751a.png">


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `akvo/rest/serializers/related_project.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 # Akvo RSR is covered by the GNU Affero General Public License.
4 # See more details in the license.txt file located at the root folder of the Akvo RSR module.
5 # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
6 
7 
8 from akvo.rsr.models import RelatedProject
9 
10 from .rsr_serializer import BaseRSRSerializer
11 
12 from rest_framework import serializers
13 
14 
15 class RelatedProjectRawSerializer(BaseRSRSerializer):
16 
17     class Meta:
18         model = RelatedProject
19         fields = '__all__'
20 
21 
22 class RelatedProjectSerializer(RelatedProjectRawSerializer):
23 
24     related_project_name = serializers.ReadOnlyField(source='related_project.title')
25     related_project_show_link = serializers.ReadOnlyField()
26     relation_label = serializers.ReadOnlyField(source='iati_relation_unicode')
27
```
--- 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/akvo/rest/serializers/related_project.py b/akvo/rest/serializers/related_project.py
--- a/akvo/rest/serializers/related_project.py
+++ b/akvo/rest/serializers/related_project.py
@@ -5,7 +5,7 @@
 # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
 
 
-from akvo.rsr.models import RelatedProject
+from akvo.rsr.models import RelatedProject, Project
 
 from .rsr_serializer import BaseRSRSerializer
 
@@ -14,6 +14,9 @@
 
 class RelatedProjectRawSerializer(BaseRSRSerializer):
 
+    related_project = serializers.PrimaryKeyRelatedField(
+        allow_null=True, queryset=Project.objects.all(), required=False, default=None)
+
     class Meta:
         model = RelatedProject
         fields = '__all__'

{"golden_diff": "diff --git a/akvo/rest/serializers/related_project.py b/akvo/rest/serializers/related_project.py\n--- a/akvo/rest/serializers/related_project.py\n+++ b/akvo/rest/serializers/related_project.py\n@@ -5,7 +5,7 @@\n # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n \n \n-from akvo.rsr.models import RelatedProject\n+from akvo.rsr.models import RelatedProject, Project\n \n from .rsr_serializer import BaseRSRSerializer\n \n@@ -14,6 +14,9 @@\n \n class RelatedProjectRawSerializer(BaseRSRSerializer):\n \n+    related_project = serializers.PrimaryKeyRelatedField(\n+        allow_null=True, queryset=Project.objects.all(), required=False, default=None)\n+\n     class Meta:\n         model = RelatedProject\n         fields = '__all__'\n", "issue": "/related_project/ issue\nAttempted to POST the following data:\r\n{\"relation\":\"1\",\"project\":\"8012\",\"related_iati_id\":\"23232\"}\r\n\r\nThe response is 400:\r\n`related_project: [\"This field is required.\"]`\r\n\r\nHowever, we want to allow a selection of external project:\r\n<img width=\"1440\" alt=\"Screenshot 2019-08-16 10 16 11\" src=\"https://user-images.githubusercontent.com/1336477/63150230-effe3400-c00e-11e9-8aff-dc162686751a.png\">\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\n\nfrom akvo.rsr.models import RelatedProject\n\nfrom .rsr_serializer import BaseRSRSerializer\n\nfrom rest_framework import serializers\n\n\nclass RelatedProjectRawSerializer(BaseRSRSerializer):\n\n    class Meta:\n        model = RelatedProject\n        fields = '__all__'\n\n\nclass RelatedProjectSerializer(RelatedProjectRawSerializer):\n\n    related_project_name = serializers.ReadOnlyField(source='related_project.title')\n    related_project_show_link = serializers.ReadOnlyField()\n    relation_label = serializers.ReadOnlyField(source='iati_relation_unicode')\n", "path": "akvo/rest/serializers/related_project.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\n\nfrom akvo.rsr.models import RelatedProject, Project\n\nfrom .rsr_serializer import BaseRSRSerializer\n\nfrom rest_framework import serializers\n\n\nclass RelatedProjectRawSerializer(BaseRSRSerializer):\n\n    related_project = serializers.PrimaryKeyRelatedField(\n        allow_null=True, queryset=Project.objects.all(), required=False, default=None)\n\n    class Meta:\n        model = RelatedProject\n        fields = '__all__'\n\n\nclass RelatedProjectSerializer(RelatedProjectRawSerializer):\n\n    related_project_name = serializers.ReadOnlyField(source='related_project.title')\n    related_project_show_link = serializers.ReadOnlyField()\n    relation_label = serializers.ReadOnlyField(source='iati_relation_unicode')\n", "path": "akvo/rest/serializers/related_project.py"}]}