feat(api): ignore weekly report if SMTP not configured
This commit is contained in:
parent
8aec595495
commit
119ecd7743
1 changed files with 3 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ def edit_config(user_id, weekly_report):
|
|||
|
||||
|
||||
def cron():
|
||||
if not helper.has_smtp():
|
||||
print("!!! No SMTP configuration found, ignoring weekly report")
|
||||
return
|
||||
with pg_client.PostgresClient(long_query=True) as cur:
|
||||
params = {"3_days_ago": TimeUTC.midnight(delta_days=-3),
|
||||
"1_week_ago": TimeUTC.midnight(delta_days=-7),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue