Fixing the registrar_exec method.
parent
65b39e4bb8
commit
4b548df2f7
|
@ -1,6 +1,5 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import json
|
import json
|
||||||
from time import time
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
@ -85,10 +84,12 @@ class DataAPI:
|
||||||
---
|
---
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
today_date = datetime.now().isoformat()[:10]
|
||||||
|
|
||||||
table_check = self.do({
|
table_check = self.do({
|
||||||
"Col": register_table,
|
"Col": register_table,
|
||||||
"Op": "R",
|
"Op": "R",
|
||||||
"Q": f"@[?date=='{datetime.now().isoformat()}']"
|
"Q": f"@[?date=='{today_date}']"
|
||||||
})
|
})
|
||||||
|
|
||||||
if len(table_check["data"]) > 0:
|
if len(table_check["data"]) > 0:
|
||||||
|
@ -138,7 +139,7 @@ class DataAPI:
|
||||||
"Col": register_table,
|
"Col": register_table,
|
||||||
"Op": "C",
|
"Op": "C",
|
||||||
"Data": {
|
"Data": {
|
||||||
"date": datetime.now().isoformat(),
|
"date": today_date,
|
||||||
"exec": success,
|
"exec": success,
|
||||||
"err": fail,
|
"err": fail,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue