diff options
author | zsloan | 2023-03-17 16:25:51 +0000 |
---|---|---|
committer | zsloan | 2023-03-17 16:25:51 +0000 |
commit | b414da7ff3c84564931388e81c729f0dfd06d0c3 (patch) | |
tree | 420f594c2ec62e9ee097ab16a27e9ba00a743a87 /wqflask/base/data_set | |
parent | bf103026cfcc88abdad612f0d26fef8bb78fab67 (diff) | |
download | genenetwork2-b414da7ff3c84564931388e81c729f0dfd06d0c3.tar.gz |
Fix correlation bug caused by a NULL UPDATE_TIME in the DB
Diffstat (limited to 'wqflask/base/data_set')
-rw-r--r-- | wqflask/base/data_set/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wqflask/base/data_set/utils.py b/wqflask/base/data_set/utils.py index 0077c292..703fee04 100644 --- a/wqflask/base/data_set/utils.py +++ b/wqflask/base/data_set/utils.py @@ -1,5 +1,6 @@ "data_set package utilities" +import datetime import os import json import hashlib @@ -33,6 +34,8 @@ def query_table_timestamp(dataset_type: str): f"WHERE TABLE_SCHEMA = '{fetch_db_name[3]}' " f"AND TABLE_NAME = '{dataset_type}Data'") date_time_obj = cursor.fetchone()[0] + if not date_time_obj: + date_time_obj = datetime.datetime.now() return date_time_obj.strftime("%Y-%m-%d %H:%M:%S") |