drop txn wrapper on raw sql
This commit is contained in:
@@ -240,7 +240,6 @@ class WordleDb:
|
|||||||
score.save()
|
score.save()
|
||||||
|
|
||||||
def get_users_without_score(self, round_no, hole_no, tweetable=True):
|
def get_users_without_score(self, round_no, hole_no, tweetable=True):
|
||||||
with db.atomic() as txn:
|
|
||||||
hole = self.get_or_create_hole(round_no, hole_no)
|
hole = self.get_or_create_hole(round_no, hole_no)
|
||||||
# Find users who *have* played in this round,
|
# Find users who *have* played in this round,
|
||||||
# but have no score on the current hole
|
# but have no score on the current hole
|
||||||
@@ -260,5 +259,5 @@ class WordleDb:
|
|||||||
# Restrict to users who post scores on twitter
|
# Restrict to users who post scores on twitter
|
||||||
query_str += " AND u.check_twitter = true"
|
query_str += " AND u.check_twitter = true"
|
||||||
|
|
||||||
res = txn.execute_sql(query_str)
|
res = db.execute_sql(query_str)
|
||||||
return [r[0] for r in res]
|
return [r[0] for r in res]
|
||||||
|
|||||||
Reference in New Issue
Block a user