Skip to content

Commit

Permalink
Change start to end in school year check in can user participate (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikibrezinova authored Apr 13, 2024
1 parent fc10eec commit 70ab7ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions competition/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from competition.exceptions import FreezingNotClosedResults
from competition.querysets import ActiveQuerySet
from competition.utils.school_year_manipulation import (
get_school_year_end_by_date, get_school_year_start_by_date)
get_school_year_end_by_date)
from personal.models import Profile, School
from user.models import User

Expand Down Expand Up @@ -79,7 +79,7 @@ class Meta:

def can_user_participate(self, user):
if self.min_years_until_graduation is not None:
return user.profile.year_of_graduation-get_school_year_start_by_date() \
return user.profile.year_of_graduation-get_school_year_end_by_date() \
>= self.min_years_until_graduation
return True

Expand Down

0 comments on commit 70ab7ca

Please sign in to comment.