Skip to content

Commit d8991bd

Browse files
committed
Don't truncate ratings to integers.
1 parent deb037d commit d8991bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "polympics-vote"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
description = "An interaction-based Discord bot for artwork voting in the Polympics."
55
authors = ["Artemis <[email protected]>"]
66
license = "MIT"

vote-bot/commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async def raffle(interaction: Interaction):
111111
@client.command(default_permission=False)
112112
async def winner(interaction: Interaction):
113113
"""Get the winning artwork, and runners up."""
114-
rating = peewee.fn.Avg(Vote.rating).alias("rating")
114+
rating = peewee.fn.Avg(Vote.rating, coerce=False).alias("rating")
115115
votes = peewee.fn.Count(Vote.id).alias("votes")
116116
leaderboard = list(
117117
Artwork.select(Artwork, rating, votes)

0 commit comments

Comments
 (0)