Adding query property to DatabaseMaster for forward compatibility
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 30 Nov 2014 21:17:09 +0000 (15:17 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 3 Dec 2014 21:40:57 +0000 (15:40 -0600)
mediagoblin/db/open.py

index c094f7539968fbbe0300baa3fd0d74b9daa5698d..e85536dee23d2fdf774ef890ca282a4f586ff308 100644 (file)
@@ -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