X-Git-Url: https://git.llucax.com/software/sercom-old.git/blobdiff_plain/53e0d8d7546953717a68b65e79d48a0a0c763caf..296cd152457559e262fcb64c429ca83f8a0c6b0c:/src/sercom/dbo.py diff --git a/src/sercom/dbo.py b/src/sercom/dbo.py index 518dc5e..7a09f81 100644 --- a/src/sercom/dbo.py +++ b/src/sercom/dbo.py @@ -55,7 +55,7 @@ class Ejercicio(BaseSQLObject): numero = Col() docente = ForeignKey('Docente') # Joins - casosDePrueba = MultipleJoin('CasoDePrueba') + casosDePrueba = MultipleJoin('CasoDePrueba', joinMethodName='casosDePrueba') # XXX hack entregas = MultipleJoin('Entrega') cursos = RelatedJoin('Curso', intermediateTable = 'entrega') @@ -105,9 +105,9 @@ class Intento(BaseSQLObject): pruebas = MultipleJoin('Prueba') @classmethod - def getProximoAProbar(cls, connection = None): + def getProximoAProbar(cls, connection=None): try: - return cls.select(cls.q.compila == None, limit=1, + return cls.select(None == cls.q.compila, limit=1, orderBy=cls.q.llegada, connection=connection)[0] except IndexError: return None