due at fix 2

This commit is contained in:
2022-01-06 21:52:17 +01:00
parent 2fc7922707
commit cb632e9e8e
3 changed files with 13 additions and 2 deletions

View File

@ -6,8 +6,10 @@ import datetime
def perform(dbh, params):
try:
createdAt = params['created_at']
dueAt = createdAt.replace(day=1)
except KeyError:
createdAt = datetime.datetime.today().strftime("%Y-%m-%d")
dueAt = createdAt.replace(day=1)
tenants = dbGetMany(dbh, { "statement": "SELECT * FROM tenant_t", "params": () })
for tenant in tenants: