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