fix: More typos in raw data query
This commit is contained in:
@@ -161,7 +161,7 @@ class ActiveSubathon:
|
||||
|
||||
result = await (
|
||||
SubathonContribution.table.select_where(
|
||||
subathoid=self.subathondata.subathon_id
|
||||
subathon_id=self.subathondata.subathon_id
|
||||
)
|
||||
.join(
|
||||
"subscribe_events",
|
||||
@@ -172,11 +172,11 @@ class ActiveSubathon:
|
||||
.with_no_adapter()
|
||||
)
|
||||
|
||||
total_points += result["total"]
|
||||
total_points += result[0]["total"] or 0
|
||||
|
||||
result = await (
|
||||
SubathonContribution.table.select_where(
|
||||
subathoid=self.subathondata.subathon_id
|
||||
subathon_id=self.subathondata.subathon_id
|
||||
)
|
||||
.join(
|
||||
"subscribe_message_events",
|
||||
@@ -187,14 +187,14 @@ class ActiveSubathon:
|
||||
.with_no_adapter()
|
||||
)
|
||||
|
||||
total_points += result["total"]
|
||||
total_points += result[0]["total"] or 0
|
||||
|
||||
result = await (
|
||||
SubathonContribution.table.select_where(
|
||||
subathoid=self.subathondata.subathon_id
|
||||
subathon_id=self.subathondata.subathon_id
|
||||
)
|
||||
.join(
|
||||
"subscribe_gift_events",
|
||||
"gift_events",
|
||||
using=("event_id",),
|
||||
join_type=JOINTYPE.INNER,
|
||||
)
|
||||
@@ -202,7 +202,7 @@ class ActiveSubathon:
|
||||
.with_no_adapter()
|
||||
)
|
||||
|
||||
total_points += result["total"]
|
||||
total_points += result[0]["total"] or 0
|
||||
|
||||
return total_points
|
||||
|
||||
@@ -213,7 +213,7 @@ class ActiveSubathon:
|
||||
"""
|
||||
result = await (
|
||||
SubathonContribution.table.select_where(
|
||||
subathoid=self.subathondata.subathon_id
|
||||
subathon_id=self.subathondata.subathon_id
|
||||
)
|
||||
.join(
|
||||
"bits_events",
|
||||
@@ -223,7 +223,7 @@ class ActiveSubathon:
|
||||
.select(total="SUM(bits)")
|
||||
.with_no_adapter()
|
||||
)
|
||||
return result["total"]
|
||||
return result[0]["total"] or 0
|
||||
|
||||
|
||||
class SubathonRegistry:
|
||||
|
||||
Reference in New Issue
Block a user