Remove config param from record_event_points().
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user