Skip to content

Commit

Permalink
Ohandlovane chybajuce season_code
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe committed Nov 24, 2024
1 parent 85083bb commit 730763e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion competition/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ class Meta:
validators = []

def validate(self, attrs):
if attrs['season_code'] not in (0, 1):
if attrs.get('season_code', 0) not in (0, 1):
raise ValidationError(
'Seminár musí byť zimný alebo letný(season_code 0 alebo 1)')
return super().validate(attrs)
Expand Down

0 comments on commit 730763e

Please sign in to comment.