fix: get_new_users_month - use 'created_at' instead of non-existent 'created_date' column in users table
This commit is contained in:
parent
87dc6da0af
commit
a8eaa4e219
@ -229,7 +229,7 @@ async def get_new_users_month(request):
|
|||||||
month_start = datetime.now().strftime('%Y-%m-01')
|
month_start = datetime.now().strftime('%Y-%m-01')
|
||||||
async with get_sor_context(env, 'sage') as sor:
|
async with get_sor_context(env, 'sage') as sor:
|
||||||
sql = """
|
sql = """
|
||||||
SELECT COUNT(*) as cnt FROM users WHERE created_date >= ${month_start}$
|
SELECT COUNT(*) as cnt FROM users WHERE created_at >= ${month_start}$
|
||||||
"""
|
"""
|
||||||
recs = await sor.sqlExe(sql, {'month_start': month_start})
|
recs = await sor.sqlExe(sql, {'month_start': month_start})
|
||||||
cnt = int(recs[0].get('cnt', 0)) if recs else 0
|
cnt = int(recs[0].get('cnt', 0)) if recs else 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user