Skip to content

Commit 5a3b75b

Browse files
author
Théo Sabattié
committed
Fixed: cannot edit election due to start_date
1 parent d24d296 commit 5a3b75b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/crud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def update_election(
368368
update_grades(db, election.grades, db_election.grades)
369369

370370
# Check if start_date is being changed
371-
if election.date_start is not None and str(db_election.date_start) != election.date_start:
371+
if election.date_start is not None and schemas.parse_date(db_election.date_start) != schemas.parse_date(election.date_start):
372372
# If so, check if any votes have been cast
373373
num_votes_cast = db.query(models.Vote).filter(
374374
models.Vote.election_ref == election_ref,

0 commit comments

Comments
 (0)