From: Alexey Shamrin Date: Mon, 13 Mar 2006 07:16:53 +0000 (+0000) Subject: Fix docstring and exception message in selectone_by X-Git-Tag: rel_0_1_4~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=989f77bc4b12fe3b7e942c182f7021e30db4c692;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix docstring and exception message in selectone_by --- diff --git a/lib/sqlalchemy/mapping/mapper.py b/lib/sqlalchemy/mapping/mapper.py index 7254d70bdc..b3378a76b2 100644 --- a/lib/sqlalchemy/mapping/mapper.py +++ b/lib/sqlalchemy/mapping/mapper.py @@ -399,11 +399,11 @@ class Mapper(object): return self.get_by(*args, **params) def selectone_by(self, *args, **params): - """works like selectfirst(), but throws an error if not exactly one result was returned.""" + """works like selectfirst_by(), but throws an error if not exactly one result was returned.""" ret = self.select_by(*args, **params) if len(ret) == 1: return ret[0] - raise InvalidRequestError('Multiple rows returned for selectone') + raise InvalidRequestError('Multiple rows returned for selectone_by') def count_by(self, *args, **params): """returns the count of instances based on the given clauses and key/value criterion.