We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add fields in ChallengePhaseSerializer
Please add fields `max_submissions_per_day` and `max_submissions` in the `Challenge Phase Serializer`. It is needed for the issue #704 .

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `apps/challenges/serializers.py`
Content:
```
1 from rest_framework import serializers
2 
3 from hosts.serializers import ChallengeHostTeamSerializer
4 
5 from .models import (
6                      Challenge,
7                      ChallengePhase,
8                      ChallengePhaseSplit,
9                      DatasetSplit,)
10 
11 
12 class ChallengeSerializer(serializers.ModelSerializer):
13 
14     is_active = serializers.ReadOnlyField()
15 
16     def __init__(self, *args, **kwargs):
17         super(ChallengeSerializer, self).__init__(*args, **kwargs)
18         context = kwargs.get('context')
19         if context and context.get('request').method != 'GET':
20             challenge_host_team = context.get('challenge_host_team')
21             kwargs['data']['creator'] = challenge_host_team.pk
22         else:
23             self.fields['creator'] = ChallengeHostTeamSerializer()
24 
25     class Meta:
26         model = Challenge
27         fields = ('id', 'title', 'description', 'terms_and_conditions',
28                   'submission_guidelines', 'evaluation_details',
29                   'image', 'start_date', 'end_date', 'creator',
30                   'published', 'enable_forum', 'anonymous_leaderboard', 'is_active',)
31 
32 
33 class ChallengePhaseSerializer(serializers.ModelSerializer):
34 
35     is_active = serializers.ReadOnlyField()
36 
37     def __init__(self, *args, **kwargs):
38         super(ChallengePhaseSerializer, self).__init__(*args, **kwargs)
39         context = kwargs.get('context')
40         if context:
41             challenge = context.get('challenge')
42             kwargs['data']['challenge'] = challenge.pk
43 
44     class Meta:
45         model = ChallengePhase
46         fields = ('id', 'name', 'description', 'leaderboard_public', 'start_date',
47                   'end_date', 'challenge', 'is_public', 'is_active', 'codename')
48 
49 
50 class DatasetSplitSerializer(serializers.ModelSerializer):
51 
52     class Meta:
53         model = DatasetSplit
54         fields = '__all__'
55 
56 
57 class ChallengePhaseSplitSerializer(serializers.ModelSerializer):
58     """Serialize the ChallengePhaseSplits Model"""
59 
60     dataset_split_name = serializers.SerializerMethodField()
61     challenge_phase_name = serializers.SerializerMethodField()
62 
63     class Meta:
64         model = ChallengePhaseSplit
65         fields = '__all__'
66         fields = ('id', 'dataset_split', 'challenge_phase', 'challenge_phase_name', 'dataset_split_name', 'visibility')
67 
68     def get_dataset_split_name(self, obj):
69         return obj.dataset_split.name
70 
71     def get_challenge_phase_name(self, obj):
72         return obj.challenge_phase.name
73
```
--- 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/apps/challenges/serializers.py b/apps/challenges/serializers.py
--- a/apps/challenges/serializers.py
+++ b/apps/challenges/serializers.py
@@ -44,7 +44,8 @@
     class Meta:
         model = ChallengePhase
         fields = ('id', 'name', 'description', 'leaderboard_public', 'start_date',
-                  'end_date', 'challenge', 'is_public', 'is_active', 'codename')
+                  'end_date', 'challenge', 'max_submissions_per_day', 'max_submissions',
+                  'is_public', 'is_active', 'codename')
 
 
 class DatasetSplitSerializer(serializers.ModelSerializer):

{"golden_diff": "diff --git a/apps/challenges/serializers.py b/apps/challenges/serializers.py\n--- a/apps/challenges/serializers.py\n+++ b/apps/challenges/serializers.py\n@@ -44,7 +44,8 @@\n     class Meta:\n         model = ChallengePhase\n         fields = ('id', 'name', 'description', 'leaderboard_public', 'start_date',\n-                  'end_date', 'challenge', 'is_public', 'is_active', 'codename')\n+                  'end_date', 'challenge', 'max_submissions_per_day', 'max_submissions',\n+                  'is_public', 'is_active', 'codename')\n \n \n class DatasetSplitSerializer(serializers.ModelSerializer):\n", "issue": "Add fields in ChallengePhaseSerializer\nPlease add fields `max_submissions_per_day` and `max_submissions` in the `Challenge Phase Serializer`. It is needed for the issue #704 .\n", "before_files": [{"content": "from rest_framework import serializers\n\nfrom hosts.serializers import ChallengeHostTeamSerializer\n\nfrom .models import (\n                     Challenge,\n                     ChallengePhase,\n                     ChallengePhaseSplit,\n                     DatasetSplit,)\n\n\nclass ChallengeSerializer(serializers.ModelSerializer):\n\n    is_active = serializers.ReadOnlyField()\n\n    def __init__(self, *args, **kwargs):\n        super(ChallengeSerializer, self).__init__(*args, **kwargs)\n        context = kwargs.get('context')\n        if context and context.get('request').method != 'GET':\n            challenge_host_team = context.get('challenge_host_team')\n            kwargs['data']['creator'] = challenge_host_team.pk\n        else:\n            self.fields['creator'] = ChallengeHostTeamSerializer()\n\n    class Meta:\n        model = Challenge\n        fields = ('id', 'title', 'description', 'terms_and_conditions',\n                  'submission_guidelines', 'evaluation_details',\n                  'image', 'start_date', 'end_date', 'creator',\n                  'published', 'enable_forum', 'anonymous_leaderboard', 'is_active',)\n\n\nclass ChallengePhaseSerializer(serializers.ModelSerializer):\n\n    is_active = serializers.ReadOnlyField()\n\n    def __init__(self, *args, **kwargs):\n        super(ChallengePhaseSerializer, self).__init__(*args, **kwargs)\n        context = kwargs.get('context')\n        if context:\n            challenge = context.get('challenge')\n            kwargs['data']['challenge'] = challenge.pk\n\n    class Meta:\n        model = ChallengePhase\n        fields = ('id', 'name', 'description', 'leaderboard_public', 'start_date',\n                  'end_date', 'challenge', 'is_public', 'is_active', 'codename')\n\n\nclass DatasetSplitSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = DatasetSplit\n        fields = '__all__'\n\n\nclass ChallengePhaseSplitSerializer(serializers.ModelSerializer):\n    \"\"\"Serialize the ChallengePhaseSplits Model\"\"\"\n\n    dataset_split_name = serializers.SerializerMethodField()\n    challenge_phase_name = serializers.SerializerMethodField()\n\n    class Meta:\n        model = ChallengePhaseSplit\n        fields = '__all__'\n        fields = ('id', 'dataset_split', 'challenge_phase', 'challenge_phase_name', 'dataset_split_name', 'visibility')\n\n    def get_dataset_split_name(self, obj):\n        return obj.dataset_split.name\n\n    def get_challenge_phase_name(self, obj):\n        return obj.challenge_phase.name\n", "path": "apps/challenges/serializers.py"}], "after_files": [{"content": "from rest_framework import serializers\n\nfrom hosts.serializers import ChallengeHostTeamSerializer\n\nfrom .models import (\n                     Challenge,\n                     ChallengePhase,\n                     ChallengePhaseSplit,\n                     DatasetSplit,)\n\n\nclass ChallengeSerializer(serializers.ModelSerializer):\n\n    is_active = serializers.ReadOnlyField()\n\n    def __init__(self, *args, **kwargs):\n        super(ChallengeSerializer, self).__init__(*args, **kwargs)\n        context = kwargs.get('context')\n        if context and context.get('request').method != 'GET':\n            challenge_host_team = context.get('challenge_host_team')\n            kwargs['data']['creator'] = challenge_host_team.pk\n        else:\n            self.fields['creator'] = ChallengeHostTeamSerializer()\n\n    class Meta:\n        model = Challenge\n        fields = ('id', 'title', 'description', 'terms_and_conditions',\n                  'submission_guidelines', 'evaluation_details',\n                  'image', 'start_date', 'end_date', 'creator',\n                  'published', 'enable_forum', 'anonymous_leaderboard', 'is_active',)\n\n\nclass ChallengePhaseSerializer(serializers.ModelSerializer):\n\n    is_active = serializers.ReadOnlyField()\n\n    def __init__(self, *args, **kwargs):\n        super(ChallengePhaseSerializer, self).__init__(*args, **kwargs)\n        context = kwargs.get('context')\n        if context:\n            challenge = context.get('challenge')\n            kwargs['data']['challenge'] = challenge.pk\n\n    class Meta:\n        model = ChallengePhase\n        fields = ('id', 'name', 'description', 'leaderboard_public', 'start_date',\n                  'end_date', 'challenge', 'max_submissions_per_day', 'max_submissions',\n                  'is_public', 'is_active', 'codename')\n\n\nclass DatasetSplitSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = DatasetSplit\n        fields = '__all__'\n\n\nclass ChallengePhaseSplitSerializer(serializers.ModelSerializer):\n    \"\"\"Serialize the ChallengePhaseSplits Model\"\"\"\n\n    dataset_split_name = serializers.SerializerMethodField()\n    challenge_phase_name = serializers.SerializerMethodField()\n\n    class Meta:\n        model = ChallengePhaseSplit\n        fields = '__all__'\n        fields = ('id', 'dataset_split', 'challenge_phase', 'challenge_phase_name', 'dataset_split_name', 'visibility')\n\n    def get_dataset_split_name(self, obj):\n        return obj.dataset_split.name\n\n    def get_challenge_phase_name(self, obj):\n        return obj.challenge_phase.name\n", "path": "apps/challenges/serializers.py"}]}