From: Leandro Lucarella Date: Thu, 24 Mar 2005 20:02:19 +0000 (+0000) Subject: Bugfix. (SQLObject.selectBy no tiene un parametro limit) X-Git-Tag: svn_import~34 X-Git-Url: https://git.llucax.com/software/sercom-old.git/commitdiff_plain/2e0b1dba60220f578d56a58af08d7a02e8ebd806?ds=sidebyside Bugfix. (SQLObject.selectBy no tiene un parametro limit) --- diff --git a/src/sercom/sqlo.py b/src/sercom/sqlo.py index aba430a..c81e066 100644 --- a/src/sercom/sqlo.py +++ b/src/sercom/sqlo.py @@ -16,7 +16,7 @@ class BaseSQLObject(SQLObject): @classmethod def by(cls, **kw): try: - return cls.selectBy(limit=1, **kw)[0] + return cls.selectBy(**kw)[0] except IndexError: raise SQLObjectNotFound, "The object %s with columns %s does not exist" % (cls.__name__, kw)