debug-get-with-stat
This commit is contained in:
parent
837763ed64
commit
818b4ccae9
|
@ -180,7 +180,8 @@ def get_with_stat(q):
|
||||||
records = []
|
records = []
|
||||||
# logger.debug(f'{q}'.replace('\n', ' '))
|
# logger.debug(f'{q}'.replace('\n', ' '))
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
for cols in session.execute(q):
|
result = session.execute(q)
|
||||||
|
for cols in result:
|
||||||
entity = cols[0]
|
entity = cols[0]
|
||||||
stat = dict()
|
stat = dict()
|
||||||
stat["shouts"] = cols[1]
|
stat["shouts"] = cols[1]
|
||||||
|
@ -194,7 +195,9 @@ def get_with_stat(q):
|
||||||
entity.stat = stat
|
entity.stat = stat
|
||||||
records.append(entity)
|
records.append(entity)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.debug(cols)
|
import traceback
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
raise Exception(exc)
|
raise Exception(exc)
|
||||||
return records
|
return records
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user