Commit 098455c6 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

bug

parent c5994650
...@@ -24,7 +24,7 @@ def setup_logging(): ...@@ -24,7 +24,7 @@ def setup_logging():
ch.setFormatter(cfmt) ch.setFormatter(cfmt)
# File handler # File handler
fh = logging.handlers.RotatingFileHandler('csst.log', fh = logging.handlers.RotatingFileHandler('logs/csst.log',
maxBytes=10*1024*1024, backupCount=10) maxBytes=10*1024*1024, backupCount=10)
fh.setLevel(logging.INFO) fh.setLevel(logging.INFO)
fh.setFormatter(ffmt) fh.setFormatter(ffmt)
...@@ -58,7 +58,7 @@ def setup_test_logging(): ...@@ -58,7 +58,7 @@ def setup_test_logging():
ch.setFormatter(cfmt) ch.setFormatter(cfmt)
# Outputs DEBUG level logging to file # Outputs DEBUG level logging to file
fh = logging.FileHandler('csst-test.log') fh = logging.FileHandler('logs/csst-test.log')
fh.setLevel(logging.DEBUG) fh.setLevel(logging.DEBUG)
fh.setFormatter(ffmt) fh.setFormatter(ffmt)
......
...@@ -38,7 +38,8 @@ class BaseModel: ...@@ -38,7 +38,8 @@ class BaseModel:
return None return None
for k in self.__dataclass_fields__.keys(): for k in self.__dataclass_fields__.keys():
if k == 'header': if k == 'header':
self.__setattr__(k, json.loads(record.__getattribute__(k))) if record.__getattribute__(k):
self.__setattr__(k, json.loads(record.__getattribute__(k)))
else: else:
self.__setattr__(k, record.__getattribute__(k)) self.__setattr__(k, record.__getattribute__(k))
return self return self
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment