Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit 8893475

Browse files
committed
get latest year to validate date
1 parent 7d83682 commit 8893475

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gsoc/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def gen_uuid_str():
5252

5353

5454
def validate_date(value):
55-
gsoc_year = GsocYear.objects.first()
55+
gsoc_year = GsocYear.objects.latest('gsoc_year')
5656
try:
5757
end_date = GsocEndDate.objects.get(
5858
date__contains=gsoc_year

0 commit comments

Comments
 (0)