We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Semesters are missing from interest form e-mails
It seems that the signal to the feed handler is triggered before the semesters are stored on the model? The semesters show up when viewing the interest later, but are not present when the email is generated. Could this have happened after the changes to semesters, @odinuge?

A quick fix would be to send the email during creation, instead of in the feed handler.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `lego/apps/feed/feed_handlers/company_interest_handler.py`
Content:
```
1 from lego.apps.companies.models import CompanyInterest
2 from lego.apps.companies.notifications import CompanyInterestNotification
3 from lego.apps.feed.activities import Activity
4 from lego.apps.feed.feed_handlers.base_handler import BaseHandler
5 from lego.apps.feed.feed_manager import feed_manager
6 from lego.apps.feed.feeds.notification_feed import NotificationFeed
7 from lego.apps.feed.registry import register_handler
8 from lego.apps.feed.verbs import CompanyInterestVerb
9 from lego.apps.users.models import AbakusGroup
10 
11 
12 class CompanyInterestHandler(BaseHandler):
13 
14     model = CompanyInterest
15     manager = feed_manager
16 
17     def handle_create(self, company_interest):
18 
19         activity = Activity(
20             actor=company_interest,
21             verb=CompanyInterestVerb,
22             object=company_interest,
23             time=company_interest.created_at,
24             extra_context={}
25         )
26 
27         recipients = [
28             member.user for member in AbakusGroup.objects.get(name="Bedkom").memberships.all()
29         ]
30 
31         self.manager.add_activity(
32             activity, [recipient.pk for recipient in recipients], [NotificationFeed]
33         )
34 
35         for recipient in recipients:
36             notification = CompanyInterestNotification(
37                 recipient, company_interest=company_interest
38             )
39             notification.notify()
40 
41     def handle_update(self, company_interest):
42         pass
43 
44     def handle_delete(self, company_interest):
45         pass
46 
47 
48 register_handler(CompanyInterestHandler)
49
```

Path: `lego/apps/companies/serializers.py`
Content:
```
1 from rest_framework import serializers
2 from rest_framework.fields import CharField
3 
4 from lego.apps.comments.serializers import CommentSerializer
5 from lego.apps.companies.models import (Company, CompanyContact, CompanyFile, CompanyInterest,
6                                         Semester, SemesterStatus)
7 from lego.apps.files.fields import FileField, ImageField
8 from lego.apps.users.fields import PublicUserField
9 from lego.apps.users.models import User
10 from lego.utils.serializers import BasisModelSerializer
11 
12 
13 class SemesterSerializer(BasisModelSerializer):
14     class Meta:
15         model = Semester
16         fields = ('id', 'year', 'semester', 'active_interest_form')
17 
18 
19 class SemesterStatusSerializer(serializers.ModelSerializer):
20 
21     class Meta:
22         model = SemesterStatus
23         fields = ('id', 'semester', 'contacted_status')
24 
25     def create(self, validated_data):
26         company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])
27         validated_data['company'] = company
28         return super().create(validated_data)
29 
30 
31 class SemesterStatusDetailSerializer(SemesterStatusSerializer):
32     contract = FileField(required=False, allow_null=True)
33     statistics = FileField(required=False, allow_null=True)
34     evaluation = FileField(required=False, allow_null=True)
35 
36     contract_name = CharField(source='contract_id', read_only=True)
37     statistics_name = CharField(source='statistics_id', read_only=True)
38     evaluation_name = CharField(source='evaluation_id', read_only=True)
39 
40     class Meta:
41         model = SemesterStatus
42         fields = ('id', 'semester', 'contacted_status', 'contract', 'statistics',
43                   'evaluation', 'contract_name', 'statistics_name', 'evaluation_name')
44 
45 
46 class CompanyContactSerializer(BasisModelSerializer):
47 
48     class Meta:
49         model = CompanyContact
50         fields = ('id', 'name', 'role', 'mail', 'phone', 'mobile')
51 
52     def create(self, validated_data):
53         company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])
54         validated_data['company'] = company
55         return super().create(validated_data)
56 
57 
58 class CompanyFileSerializer(serializers.ModelSerializer):
59     file = FileField()
60 
61     class Meta:
62         model = CompanyFile
63         fields = ('id', 'file')
64 
65     def create(self, validated_data):
66         company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])
67         validated_data['company'] = company
68         return super().create(validated_data)
69 
70 
71 class CompanyListSerializer(BasisModelSerializer):
72     logo = ImageField(required=False, options={'height': 500})
73     thumbnail = ImageField(
74         source='logo',
75         required=False,
76         options={'height': 500, 'width': 500, 'smart': True}
77     )
78 
79     class Meta:
80         model = Company
81         fields = ('id', 'name', 'description', 'website', 'company_type', 'address', 'logo',
82                   'thumbnail')
83 
84 
85 class CompanyAdminListSerializer(BasisModelSerializer):
86     semester_statuses = SemesterStatusSerializer(many=True, read_only=True)
87     student_contact = PublicUserField(required=False, queryset=User.objects.all())
88 
89     class Meta:
90         model = Company
91         fields = ('id', 'name', 'semester_statuses', 'student_contact', 'admin_comment',
92                   'active')
93 
94 
95 class CompanyDetailSerializer(BasisModelSerializer):
96     logo = ImageField(required=False, options={'height': 500})
97 
98     class Meta:
99         model = Company
100         fields = ('id', 'name', 'description', 'phone', 'company_type', 'website', 'address',
101                   'logo')
102 
103 
104 class CompanyAdminDetailSerializer(BasisModelSerializer):
105     comments = CommentSerializer(read_only=True, many=True)
106     comment_target = CharField(read_only=True)
107 
108     student_contact = PublicUserField(required=False, allow_null=True, queryset=User.objects.all())
109     semester_statuses = SemesterStatusDetailSerializer(many=True, read_only=True)
110     company_contacts = CompanyContactSerializer(many=True, read_only=True)
111 
112     logo = ImageField(required=False, options={'height': 500})
113     files = CompanyFileSerializer(many=True, read_only=True)
114 
115     class Meta:
116         model = Company
117         fields = ('id', 'name', 'student_contact', 'description', 'phone',
118                   'company_type', 'website', 'address', 'payment_mail', 'comments',
119                   'comment_target', 'semester_statuses', 'active', 'admin_comment',
120                   'logo', 'files', 'company_contacts')
121 
122 
123 class CompanyInterestSerializer(serializers.ModelSerializer):
124     class Meta:
125         model = CompanyInterest
126         fields = ('id', 'company_name', 'contact_person', 'mail', 'semesters', 'events',
127                   'other_offers', 'comment')
128 
129 
130 class CompanyInterestListSerializer(serializers.ModelSerializer):
131     class Meta:
132         model = CompanyInterest
133         fields = ('id', 'company_name', 'contact_person', 'mail')
134 
135 
136 class CompanySearchSerializer(serializers.ModelSerializer):
137     """
138     Public company information available on search.
139     """
140     class Meta:
141         model = Company
142         fields = ('id', 'name', 'description', 'website', 'company_type', 'address')
143
```
--- 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/lego/apps/companies/serializers.py b/lego/apps/companies/serializers.py
--- a/lego/apps/companies/serializers.py
+++ b/lego/apps/companies/serializers.py
@@ -4,6 +4,7 @@
 from lego.apps.comments.serializers import CommentSerializer
 from lego.apps.companies.models import (Company, CompanyContact, CompanyFile, CompanyInterest,
                                         Semester, SemesterStatus)
+from lego.apps.feed.registry import get_handler
 from lego.apps.files.fields import FileField, ImageField
 from lego.apps.users.fields import PublicUserField
 from lego.apps.users.models import User
@@ -126,6 +127,15 @@
         fields = ('id', 'company_name', 'contact_person', 'mail', 'semesters', 'events',
                   'other_offers', 'comment')
 
+    def create(self, validated_data):
+        semesters = validated_data.pop('semesters')
+        company_interest = CompanyInterest.objects.create(**validated_data)
+        company_interest.semesters.add(*semesters)
+        company_interest.save()
+        get_handler(CompanyInterest).handle_interest(company_interest)
+
+        return company_interest
+
 
 class CompanyInterestListSerializer(serializers.ModelSerializer):
     class Meta:
diff --git a/lego/apps/feed/feed_handlers/company_interest_handler.py b/lego/apps/feed/feed_handlers/company_interest_handler.py
--- a/lego/apps/feed/feed_handlers/company_interest_handler.py
+++ b/lego/apps/feed/feed_handlers/company_interest_handler.py
@@ -14,7 +14,7 @@
     model = CompanyInterest
     manager = feed_manager
 
-    def handle_create(self, company_interest):
+    def handle_interest(self, company_interest):
 
         activity = Activity(
             actor=company_interest,
@@ -38,6 +38,9 @@
             )
             notification.notify()
 
+    def handle_create(self, company_interest):
+        pass
+
     def handle_update(self, company_interest):
         pass

{"golden_diff": "diff --git a/lego/apps/companies/serializers.py b/lego/apps/companies/serializers.py\n--- a/lego/apps/companies/serializers.py\n+++ b/lego/apps/companies/serializers.py\n@@ -4,6 +4,7 @@\n from lego.apps.comments.serializers import CommentSerializer\n from lego.apps.companies.models import (Company, CompanyContact, CompanyFile, CompanyInterest,\n                                         Semester, SemesterStatus)\n+from lego.apps.feed.registry import get_handler\n from lego.apps.files.fields import FileField, ImageField\n from lego.apps.users.fields import PublicUserField\n from lego.apps.users.models import User\n@@ -126,6 +127,15 @@\n         fields = ('id', 'company_name', 'contact_person', 'mail', 'semesters', 'events',\n                   'other_offers', 'comment')\n \n+    def create(self, validated_data):\n+        semesters = validated_data.pop('semesters')\n+        company_interest = CompanyInterest.objects.create(**validated_data)\n+        company_interest.semesters.add(*semesters)\n+        company_interest.save()\n+        get_handler(CompanyInterest).handle_interest(company_interest)\n+\n+        return company_interest\n+\n \n class CompanyInterestListSerializer(serializers.ModelSerializer):\n     class Meta:\ndiff --git a/lego/apps/feed/feed_handlers/company_interest_handler.py b/lego/apps/feed/feed_handlers/company_interest_handler.py\n--- a/lego/apps/feed/feed_handlers/company_interest_handler.py\n+++ b/lego/apps/feed/feed_handlers/company_interest_handler.py\n@@ -14,7 +14,7 @@\n     model = CompanyInterest\n     manager = feed_manager\n \n-    def handle_create(self, company_interest):\n+    def handle_interest(self, company_interest):\n \n         activity = Activity(\n             actor=company_interest,\n@@ -38,6 +38,9 @@\n             )\n             notification.notify()\n \n+    def handle_create(self, company_interest):\n+        pass\n+\n     def handle_update(self, company_interest):\n         pass\n", "issue": "Semesters are missing from interest form e-mails\nIt seems that the signal to the feed handler is triggered before the semesters are stored on the model? The semesters show up when viewing the interest later, but are not present when the email is generated. Could this have happened after the changes to semesters, @odinuge?\r\n\r\nA quick fix would be to send the email during creation, instead of in the feed handler.\n", "before_files": [{"content": "from lego.apps.companies.models import CompanyInterest\nfrom lego.apps.companies.notifications import CompanyInterestNotification\nfrom lego.apps.feed.activities import Activity\nfrom lego.apps.feed.feed_handlers.base_handler import BaseHandler\nfrom lego.apps.feed.feed_manager import feed_manager\nfrom lego.apps.feed.feeds.notification_feed import NotificationFeed\nfrom lego.apps.feed.registry import register_handler\nfrom lego.apps.feed.verbs import CompanyInterestVerb\nfrom lego.apps.users.models import AbakusGroup\n\n\nclass CompanyInterestHandler(BaseHandler):\n\n    model = CompanyInterest\n    manager = feed_manager\n\n    def handle_create(self, company_interest):\n\n        activity = Activity(\n            actor=company_interest,\n            verb=CompanyInterestVerb,\n            object=company_interest,\n            time=company_interest.created_at,\n            extra_context={}\n        )\n\n        recipients = [\n            member.user for member in AbakusGroup.objects.get(name=\"Bedkom\").memberships.all()\n        ]\n\n        self.manager.add_activity(\n            activity, [recipient.pk for recipient in recipients], [NotificationFeed]\n        )\n\n        for recipient in recipients:\n            notification = CompanyInterestNotification(\n                recipient, company_interest=company_interest\n            )\n            notification.notify()\n\n    def handle_update(self, company_interest):\n        pass\n\n    def handle_delete(self, company_interest):\n        pass\n\n\nregister_handler(CompanyInterestHandler)\n", "path": "lego/apps/feed/feed_handlers/company_interest_handler.py"}, {"content": "from rest_framework import serializers\nfrom rest_framework.fields import CharField\n\nfrom lego.apps.comments.serializers import CommentSerializer\nfrom lego.apps.companies.models import (Company, CompanyContact, CompanyFile, CompanyInterest,\n                                        Semester, SemesterStatus)\nfrom lego.apps.files.fields import FileField, ImageField\nfrom lego.apps.users.fields import PublicUserField\nfrom lego.apps.users.models import User\nfrom lego.utils.serializers import BasisModelSerializer\n\n\nclass SemesterSerializer(BasisModelSerializer):\n    class Meta:\n        model = Semester\n        fields = ('id', 'year', 'semester', 'active_interest_form')\n\n\nclass SemesterStatusSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = SemesterStatus\n        fields = ('id', 'semester', 'contacted_status')\n\n    def create(self, validated_data):\n        company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])\n        validated_data['company'] = company\n        return super().create(validated_data)\n\n\nclass SemesterStatusDetailSerializer(SemesterStatusSerializer):\n    contract = FileField(required=False, allow_null=True)\n    statistics = FileField(required=False, allow_null=True)\n    evaluation = FileField(required=False, allow_null=True)\n\n    contract_name = CharField(source='contract_id', read_only=True)\n    statistics_name = CharField(source='statistics_id', read_only=True)\n    evaluation_name = CharField(source='evaluation_id', read_only=True)\n\n    class Meta:\n        model = SemesterStatus\n        fields = ('id', 'semester', 'contacted_status', 'contract', 'statistics',\n                  'evaluation', 'contract_name', 'statistics_name', 'evaluation_name')\n\n\nclass CompanyContactSerializer(BasisModelSerializer):\n\n    class Meta:\n        model = CompanyContact\n        fields = ('id', 'name', 'role', 'mail', 'phone', 'mobile')\n\n    def create(self, validated_data):\n        company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])\n        validated_data['company'] = company\n        return super().create(validated_data)\n\n\nclass CompanyFileSerializer(serializers.ModelSerializer):\n    file = FileField()\n\n    class Meta:\n        model = CompanyFile\n        fields = ('id', 'file')\n\n    def create(self, validated_data):\n        company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])\n        validated_data['company'] = company\n        return super().create(validated_data)\n\n\nclass CompanyListSerializer(BasisModelSerializer):\n    logo = ImageField(required=False, options={'height': 500})\n    thumbnail = ImageField(\n        source='logo',\n        required=False,\n        options={'height': 500, 'width': 500, 'smart': True}\n    )\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'description', 'website', 'company_type', 'address', 'logo',\n                  'thumbnail')\n\n\nclass CompanyAdminListSerializer(BasisModelSerializer):\n    semester_statuses = SemesterStatusSerializer(many=True, read_only=True)\n    student_contact = PublicUserField(required=False, queryset=User.objects.all())\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'semester_statuses', 'student_contact', 'admin_comment',\n                  'active')\n\n\nclass CompanyDetailSerializer(BasisModelSerializer):\n    logo = ImageField(required=False, options={'height': 500})\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'description', 'phone', 'company_type', 'website', 'address',\n                  'logo')\n\n\nclass CompanyAdminDetailSerializer(BasisModelSerializer):\n    comments = CommentSerializer(read_only=True, many=True)\n    comment_target = CharField(read_only=True)\n\n    student_contact = PublicUserField(required=False, allow_null=True, queryset=User.objects.all())\n    semester_statuses = SemesterStatusDetailSerializer(many=True, read_only=True)\n    company_contacts = CompanyContactSerializer(many=True, read_only=True)\n\n    logo = ImageField(required=False, options={'height': 500})\n    files = CompanyFileSerializer(many=True, read_only=True)\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'student_contact', 'description', 'phone',\n                  'company_type', 'website', 'address', 'payment_mail', 'comments',\n                  'comment_target', 'semester_statuses', 'active', 'admin_comment',\n                  'logo', 'files', 'company_contacts')\n\n\nclass CompanyInterestSerializer(serializers.ModelSerializer):\n    class Meta:\n        model = CompanyInterest\n        fields = ('id', 'company_name', 'contact_person', 'mail', 'semesters', 'events',\n                  'other_offers', 'comment')\n\n\nclass CompanyInterestListSerializer(serializers.ModelSerializer):\n    class Meta:\n        model = CompanyInterest\n        fields = ('id', 'company_name', 'contact_person', 'mail')\n\n\nclass CompanySearchSerializer(serializers.ModelSerializer):\n    \"\"\"\n    Public company information available on search.\n    \"\"\"\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'description', 'website', 'company_type', 'address')\n", "path": "lego/apps/companies/serializers.py"}], "after_files": [{"content": "from lego.apps.companies.models import CompanyInterest\nfrom lego.apps.companies.notifications import CompanyInterestNotification\nfrom lego.apps.feed.activities import Activity\nfrom lego.apps.feed.feed_handlers.base_handler import BaseHandler\nfrom lego.apps.feed.feed_manager import feed_manager\nfrom lego.apps.feed.feeds.notification_feed import NotificationFeed\nfrom lego.apps.feed.registry import register_handler\nfrom lego.apps.feed.verbs import CompanyInterestVerb\nfrom lego.apps.users.models import AbakusGroup\n\n\nclass CompanyInterestHandler(BaseHandler):\n\n    model = CompanyInterest\n    manager = feed_manager\n\n    def handle_interest(self, company_interest):\n\n        activity = Activity(\n            actor=company_interest,\n            verb=CompanyInterestVerb,\n            object=company_interest,\n            time=company_interest.created_at,\n            extra_context={}\n        )\n\n        recipients = [\n            member.user for member in AbakusGroup.objects.get(name=\"Bedkom\").memberships.all()\n        ]\n\n        self.manager.add_activity(\n            activity, [recipient.pk for recipient in recipients], [NotificationFeed]\n        )\n\n        for recipient in recipients:\n            notification = CompanyInterestNotification(\n                recipient, company_interest=company_interest\n            )\n            notification.notify()\n\n    def handle_create(self, company_interest):\n        pass\n\n    def handle_update(self, company_interest):\n        pass\n\n    def handle_delete(self, company_interest):\n        pass\n\n\nregister_handler(CompanyInterestHandler)\n", "path": "lego/apps/feed/feed_handlers/company_interest_handler.py"}, {"content": "from rest_framework import serializers\nfrom rest_framework.fields import CharField\n\nfrom lego.apps.comments.serializers import CommentSerializer\nfrom lego.apps.companies.models import (Company, CompanyContact, CompanyFile, CompanyInterest,\n                                        Semester, SemesterStatus)\nfrom lego.apps.feed.registry import get_handler\nfrom lego.apps.files.fields import FileField, ImageField\nfrom lego.apps.users.fields import PublicUserField\nfrom lego.apps.users.models import User\nfrom lego.utils.serializers import BasisModelSerializer\n\n\nclass SemesterSerializer(BasisModelSerializer):\n    class Meta:\n        model = Semester\n        fields = ('id', 'year', 'semester', 'active_interest_form')\n\n\nclass SemesterStatusSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = SemesterStatus\n        fields = ('id', 'semester', 'contacted_status')\n\n    def create(self, validated_data):\n        company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])\n        validated_data['company'] = company\n        return super().create(validated_data)\n\n\nclass SemesterStatusDetailSerializer(SemesterStatusSerializer):\n    contract = FileField(required=False, allow_null=True)\n    statistics = FileField(required=False, allow_null=True)\n    evaluation = FileField(required=False, allow_null=True)\n\n    contract_name = CharField(source='contract_id', read_only=True)\n    statistics_name = CharField(source='statistics_id', read_only=True)\n    evaluation_name = CharField(source='evaluation_id', read_only=True)\n\n    class Meta:\n        model = SemesterStatus\n        fields = ('id', 'semester', 'contacted_status', 'contract', 'statistics',\n                  'evaluation', 'contract_name', 'statistics_name', 'evaluation_name')\n\n\nclass CompanyContactSerializer(BasisModelSerializer):\n\n    class Meta:\n        model = CompanyContact\n        fields = ('id', 'name', 'role', 'mail', 'phone', 'mobile')\n\n    def create(self, validated_data):\n        company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])\n        validated_data['company'] = company\n        return super().create(validated_data)\n\n\nclass CompanyFileSerializer(serializers.ModelSerializer):\n    file = FileField()\n\n    class Meta:\n        model = CompanyFile\n        fields = ('id', 'file')\n\n    def create(self, validated_data):\n        company = Company.objects.get(pk=self.context['view'].kwargs['company_pk'])\n        validated_data['company'] = company\n        return super().create(validated_data)\n\n\nclass CompanyListSerializer(BasisModelSerializer):\n    logo = ImageField(required=False, options={'height': 500})\n    thumbnail = ImageField(\n        source='logo',\n        required=False,\n        options={'height': 500, 'width': 500, 'smart': True}\n    )\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'description', 'website', 'company_type', 'address', 'logo',\n                  'thumbnail')\n\n\nclass CompanyAdminListSerializer(BasisModelSerializer):\n    semester_statuses = SemesterStatusSerializer(many=True, read_only=True)\n    student_contact = PublicUserField(required=False, queryset=User.objects.all())\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'semester_statuses', 'student_contact', 'admin_comment',\n                  'active')\n\n\nclass CompanyDetailSerializer(BasisModelSerializer):\n    logo = ImageField(required=False, options={'height': 500})\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'description', 'phone', 'company_type', 'website', 'address',\n                  'logo')\n\n\nclass CompanyAdminDetailSerializer(BasisModelSerializer):\n    comments = CommentSerializer(read_only=True, many=True)\n    comment_target = CharField(read_only=True)\n\n    student_contact = PublicUserField(required=False, allow_null=True, queryset=User.objects.all())\n    semester_statuses = SemesterStatusDetailSerializer(many=True, read_only=True)\n    company_contacts = CompanyContactSerializer(many=True, read_only=True)\n\n    logo = ImageField(required=False, options={'height': 500})\n    files = CompanyFileSerializer(many=True, read_only=True)\n\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'student_contact', 'description', 'phone',\n                  'company_type', 'website', 'address', 'payment_mail', 'comments',\n                  'comment_target', 'semester_statuses', 'active', 'admin_comment',\n                  'logo', 'files', 'company_contacts')\n\n\nclass CompanyInterestSerializer(serializers.ModelSerializer):\n    class Meta:\n        model = CompanyInterest\n        fields = ('id', 'company_name', 'contact_person', 'mail', 'semesters', 'events',\n                  'other_offers', 'comment')\n\n    def create(self, validated_data):\n        semesters = validated_data.pop('semesters')\n        company_interest = CompanyInterest.objects.create(**validated_data)\n        company_interest.semesters.add(*semesters)\n        company_interest.save()\n        get_handler(CompanyInterest).handle_interest(company_interest)\n\n        return company_interest\n\n\nclass CompanyInterestListSerializer(serializers.ModelSerializer):\n    class Meta:\n        model = CompanyInterest\n        fields = ('id', 'company_name', 'contact_person', 'mail')\n\n\nclass CompanySearchSerializer(serializers.ModelSerializer):\n    \"\"\"\n    Public company information available on search.\n    \"\"\"\n    class Meta:\n        model = Company\n        fields = ('id', 'name', 'description', 'website', 'company_type', 'address')\n", "path": "lego/apps/companies/serializers.py"}]}