X-Git-Url: https://git.llucax.com/software/sercom-old.git/blobdiff_plain/6285de9c71f4ea14723dc752aa8048efd150a47a..f3f7cd4adfd570a7386868d12dee5a54e5dcb11f:/src/sercom/sqlo.py diff --git a/src/sercom/sqlo.py b/src/sercom/sqlo.py index aba430a..f2f1c12 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) @@ -31,7 +31,7 @@ class Curso(BaseSQLObject): docentes = RelatedJoin('Docente') entregas = MultipleJoin('Entrega') inscriptos = MultipleJoin('Inscripto') - ejercicios = RelatedJoin('Curso', intermediateTable = 'entrega') + ejercicios = RelatedJoin('Ejercicio', intermediateTable = 'entrega') class Inscripto(BaseSQLObject): # Clave