From: Christopher Allan Webber Date: Sun, 30 Nov 2014 21:17:09 +0000 (-0600) Subject: Adding query property to DatabaseMaster for forward compatibility X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9d82dff6fb4738b4efb1a7d3280562578f54ed08;p=mediagoblin.git Adding query property to DatabaseMaster for forward compatibility --- diff --git a/mediagoblin/db/open.py b/mediagoblin/db/open.py index c094f753..e85536de 100644 --- a/mediagoblin/db/open.py +++ b/mediagoblin/db/open.py @@ -64,6 +64,10 @@ if not DISABLE_GLOBALS: Session.rollback() Session.remove() + @property + def query(self): + return Session.query + else: from sqlalchemy.orm import sessionmaker