]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix docstring and exception message in selectone_by
authorAlexey Shamrin <none@none>
Mon, 13 Mar 2006 07:16:53 +0000 (07:16 +0000)
committerAlexey Shamrin <none@none>
Mon, 13 Mar 2006 07:16:53 +0000 (07:16 +0000)
lib/sqlalchemy/mapping/mapper.py

index 7254d70bdc361c9016914b62b0d660e6d76fce2d..b3378a76b2583d1eeb302472231ef77838109cc0 100644 (file)
@@ -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.