mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-14 14:22:32 +00:00
fix(sync): Get correct parameter for requisition creation time.
This commit is contained in:
@@ -22,10 +22,10 @@ def sync(ctx: click.Context):
|
|||||||
for r in res.get("results", []):
|
for r in res.get("results", []):
|
||||||
accounts.update(r.get("accounts", []))
|
accounts.update(r.get("accounts", []))
|
||||||
|
|
||||||
for r in res["results"]:
|
for r in res.get("results", []):
|
||||||
account_status = REQUISITION_STATUS.get(r["status"], "UNKNOWN")
|
account_status = REQUISITION_STATUS.get(r["status"], "UNKNOWN")
|
||||||
if account_status != "LINKED":
|
if account_status != "LINKED":
|
||||||
created_at = datetime.fromisoformat(r["createdAt"])
|
created_at = datetime.fromisoformat(r["created"])
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
if (created_at - now).days <= 15:
|
if (created_at - now).days <= 15:
|
||||||
n = {
|
n = {
|
||||||
|
|||||||
Reference in New Issue
Block a user