aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/sql/base.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-24 18:19:40 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-24 19:11:42 +0100
commit4305580e8538e5523e9f621c3ffbed14a2ddc350 (patch)
treef41a279cf3d3153e6d0f76d3c7d95233648262f8 /mediagoblin/db/sql/base.py
parent2608982885477e2f41579240d24a26864f718123 (diff)
downloadmediagoblin-4305580e8538e5523e9f621c3ffbed14a2ddc350.tar.lz
mediagoblin-4305580e8538e5523e9f621c3ffbed14a2ddc350.tar.xz
mediagoblin-4305580e8538e5523e9f621c3ffbed14a2ddc350.zip
Improve .one() by using sqlalchemy's .one()
Diffstat (limited to 'mediagoblin/db/sql/base.py')
-rw-r--r--mediagoblin/db/sql/base.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/mediagoblin/db/sql/base.py b/mediagoblin/db/sql/base.py
index 38b04334..5e420bdc 100644
--- a/mediagoblin/db/sql/base.py
+++ b/mediagoblin/db/sql/base.py
@@ -24,6 +24,4 @@ class GMGTableBase(object):
@classmethod
def one(cls, query_dict):
- retval = cls.find_one(query_dict)
- assert retval is not None
- return retval
+ return cls.find(query_dict).one()