Remove config param from record_event_points().

This commit is contained in:
2024-09-03 19:31:40 -04:00
parent b1f8e9d742
commit 06d81a4604
2 changed files with 4 additions and 8 deletions
+3 -3
View File
@@ -289,7 +289,7 @@ def decorate_dm_nomination(user_id: int, speech: str) -> str:
return msg
def record_event_points(config: DakinySettings, users: Sequence[str], add_points: int, *, is_member: bool) -> None:
def record_event_points(users: Sequence[str], add_points: int, *, is_member: bool) -> None:
"""
Adds event points to all users listed.
@@ -309,7 +309,7 @@ def record_event_points(config: DakinySettings, users: Sequence[str], add_points
points = session.scalar(stmt)
if points is None:
add_points = get_allowed_points(session, config.params.event_points_weekly_limit, user, add_points)
add_points = get_allowed_points(session, settings.event_settings.weekly_limit, user, add_points)
new_points = EventPoints(
QuarterName=quarter_name,
UserId=user,
@@ -318,7 +318,7 @@ def record_event_points(config: DakinySettings, users: Sequence[str], add_points
)
session.add(new_points)
else:
add_points = get_allowed_points(session, config.params.event_points_weekly_limit, user, add_points)
add_points = get_allowed_points(session, settings.event_settings.weekly_limit, user, add_points)
points.Points += add_points
session.commit()