Skip to content

Commit

Permalink
fix: Caselog should get latest case id
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Aug 12, 2023
1 parent b53da38 commit 825ae55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zibot/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ async def doCaselog(
) -> Optional[int]:
# I had to use .values() instead of .first() because of a known Tortoise issue
# REF: https://github.com/tortoise/tortoise-orm/issues/794
q: list[dict[str, Any]] = await db.CaseLog.filter(guild_id=guildId).annotate(caseNum=Max("caseId")).values("caseId") # type: ignore
q: list[dict[str, Any]] = await db.CaseLog.filter(guild_id=guildId).annotate(caseId=Max("caseId")).values("caseId") # type: ignore

try:
caseNum = q[0]["caseId"]
Expand Down

0 comments on commit 825ae55

Please sign in to comment.