Skip to content

Commit 0b153f2

Browse files
committed
minor tweaks
1 parent a2871df commit 0b153f2

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

src/alembic/versions/46d14891e1a9_elections.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/elections/urls.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ async def get_election(
9393
all_nominations = await elections.crud.get_all_registrations_in_election(db_session, slugified_name)
9494
election_json["candidates"] = []
9595

96-
avaliable_positions_list = election.available_positions.split(",")
96+
available_positions_list = election.available_positions.split(",")
9797
for nomination in all_nominations:
98-
if nomination.position not in avaliable_positions_list:
98+
if nomination.position not in available_positions_list:
9999
# ignore any positions that are **no longer** active
100100
continue
101101

@@ -195,7 +195,7 @@ async def create_election(
195195
else:
196196
raise HTTPException(
197197
status_code=status.HTTP_400_BAD_REQUEST,
198-
detail=f"invalid election type {election_type} for avaliable positions"
198+
detail=f"invalid election type {election_type} for available positions"
199199
)
200200
slugified_name = _slugify(election_name)
201201
current_time = datetime.now()
@@ -287,7 +287,7 @@ async def update_election(
287287
detail=f"election with slug {slugified_name} does not exist",
288288
)
289289

290-
# NOTE: If you update avaliable positions, people will still *technically* be able to update their
290+
# NOTE: If you update available positions, people will still *technically* be able to update their
291291
# registrations, however they will not be returned in the results.
292292
await elections.crud.update_election(
293293
db_session,
@@ -406,7 +406,7 @@ async def register_in_election(
406406
# not updating or deleting one
407407
raise HTTPException(
408408
status_code=status.HTTP_400_BAD_REQUEST,
409-
detail=f"{position} is not avaliable to register for in this election"
409+
detail=f"{position} is not available to register for in this election"
410410
)
411411
elif election.status(current_time) != elections.tables.STATUS_NOMINATIONS:
412412
raise HTTPException(
@@ -494,7 +494,7 @@ async def delete_registration(
494494
if not logged_in:
495495
raise HTTPException(
496496
status_code=status.HTTP_401_UNAUTHORIZED,
497-
detail="must be logged in to delete election registeration"
497+
detail="must be logged in to delete election registration"
498498
)
499499
elif position not in OfficerPosition.position_list():
500500
raise HTTPException(

0 commit comments

Comments
 (0)