Fixing the registrar_exec method.

data_sync
Pedro de Oliveira Guedes 2022-01-20 09:57:15 -03:00
parent 65b39e4bb8
commit 4b548df2f7
1 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,5 @@
from datetime import datetime
import json
from time import time
import requests
@ -85,10 +84,12 @@ class DataAPI:
---
"""
today_date = datetime.now().isoformat()[:10]
table_check = self.do({
"Col": register_table,
"Op": "R",
"Q": f"@[?date=='{datetime.now().isoformat()}']"
"Q": f"@[?date=='{today_date}']"
})
if len(table_check["data"]) > 0:
@ -138,7 +139,7 @@ class DataAPI:
"Col": register_table,
"Op": "C",
"Data": {
"date": datetime.now().isoformat(),
"date": today_date,
"exec": success,
"err": fail,
}