Skip to content

Commit

Permalink
Remove unused create on ProfileCreateSerializer (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe authored Nov 23, 2024
1 parent 7002e86 commit 04b148b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions personal/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,6 @@ def update(self, instance, validated_data):
instance.save()
return instance

def create(self, validated_data):
grade = Grade.objects.create(validated_data['grade'])
return Profile.objects.create(
first_name=validated_data['first_name'],
last_name=validated_data['last_name'],
school=validated_data['school'],
year_of_graduation=grade.get_year_of_graduation_by_date(),
phone=validated_data['phone'],
parent_phone=validated_data['parent_phone'],
)


@ts_interface(context='personal')
class ProfileShortSerializer(serializers.ModelSerializer):
Expand Down

0 comments on commit 04b148b

Please sign in to comment.