use db_session for articles and sections

This commit is contained in:
Andreas Stephanides
2017-02-21 19:55:19 +01:00
parent ae2f61485e
commit 4a935ee4a9
9 changed files with 18 additions and 41 deletions

View File

@@ -128,7 +128,7 @@ class Article(Base):
@classmethod
def from_hash(cls, a):
fp = calc_fingerprint_h(a)
aa = Article.query.filter(Article.fingerprint==fp).first()
aa = db_session.query(Article).filter(Article.fingerprint==fp).first()
if aa is None:
clogger.debug( "new Article")
if a["published"] is not None: