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

bug

parent c5994650
......@@ -24,7 +24,7 @@ def setup_logging():
ch.setFormatter(cfmt)
# File handler
fh = logging.handlers.RotatingFileHandler('csst.log',
fh = logging.handlers.RotatingFileHandler('logs/csst.log',
maxBytes=10*1024*1024, backupCount=10)
fh.setLevel(logging.INFO)
fh.setFormatter(ffmt)
......@@ -58,7 +58,7 @@ def setup_test_logging():
ch.setFormatter(cfmt)
# Outputs DEBUG level logging to file
fh = logging.FileHandler('csst-test.log')
fh = logging.FileHandler('logs/csst-test.log')
fh.setLevel(logging.DEBUG)
fh.setFormatter(ffmt)
......
......@@ -38,7 +38,8 @@ class BaseModel:
return None
for k in self.__dataclass_fields__.keys():
if k == 'header':
self.__setattr__(k, json.loads(record.__getattribute__(k)))
if record.__getattribute__(k):
self.__setattr__(k, json.loads(record.__getattribute__(k)))
else:
self.__setattr__(k, record.__getattribute__(k))
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