Skip to content

Commit

Permalink
Opravene zmena rocniku v profile (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe authored Apr 13, 2024
1 parent 1630672 commit 8efb2ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions user/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ class Meta:
def update(self, instance, validated_data):
profile_data = validated_data.pop('profile')

profile_data['year_of_graduation'] = Grade.objects.get(
pk=profile_data.get('grade')).get_year_of_graduation_by_date()
# Profile by mal byť stále vytvorený pomocou post_save User signálu.
# Pre prípad, že sa tak nestalo, vytvorí sa Profile
if not instance.profile:
Expand Down

0 comments on commit 8efb2ae

Please sign in to comment.