tweak: Add contribution logging.

This commit is contained in:
2025-10-30 22:48:34 +10:00
parent 84791e6b91
commit 21cf65398c
2 changed files with 199 additions and 141 deletions

View File

@@ -126,12 +126,14 @@ class ActiveSubathon:
async def add_contribution(
self, profileid: int | None, score: float, event_id: int | None
) -> SubathonContribution:
return await SubathonContribution.create(
row = await SubathonContribution.create(
subathon_id=self.subathondata.subathon_id,
profileid=profileid,
score=score,
event_id=event_id,
)
logger.info(f"Added contribution {row!r} to subathon {self.subathondata!r}")
return row
def fetch_contributions(self, **kwargs):
query = SubathonContribution.fetch_where(