From eb9377271b16d41479429d6396680b26318ed71b Mon Sep 17 00:00:00 2001 From: timotheyca Date: Sun, 9 Aug 2020 01:01:09 +0300 Subject: [PATCH] missing sssj fix --- v25/storage/dbstorage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v25/storage/dbstorage.py b/v25/storage/dbstorage.py index 3fbf738..71e5723 100644 --- a/v25/storage/dbstorage.py +++ b/v25/storage/dbstorage.py @@ -80,7 +80,8 @@ class DBStorage(AbstractStorage): def check(self, subject: Subject) -> dict: session = self.Session() - status = json.loads(session.query(SSSJ).filter_by(subject=subject.vkey.encode()).one_or_none().status) or {} + sssj = session.query(SSSJ).filter_by(subject=subject.vkey.encode()).one_or_none() + status = json.loads(sssj.status) if sssj else {} if 'contacts' in status: query: Query = session.query(Msg).filter(or_( Msg.sf == subject.vkey.encode(),