From 730763e222b2795c8d2ff4d76b38e21b5f2b6676 Mon Sep 17 00:00:00 2001 From: kovacspe Date: Sun, 24 Nov 2024 02:05:54 +0100 Subject: [PATCH] Ohandlovane chybajuce season_code --- competition/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/competition/serializers.py b/competition/serializers.py index d20e541..c90ce14 100644 --- a/competition/serializers.py +++ b/competition/serializers.py @@ -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)