From: Leandro Lucarella Date: Mon, 21 Feb 2005 19:37:22 +0000 (+0000) Subject: Hack para esquivar un bug de SQLObject. X-Git-Tag: svn_import~97 X-Git-Url: https://git.llucax.com/software/sercom-old.git/commitdiff_plain/868ddf40753af7bd1fa6de93181203d53edcabc7 Hack para esquivar un bug de SQLObject. --- 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