Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 22506E00AF8; Tue, 23 May 2017 21:51:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D46A7E009A5 for ; Tue, 23 May 2017 21:51:27 -0700 (PDT) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id v4O4pQr4023179 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK) for ; Tue, 23 May 2017 21:51:26 -0700 Received: from ala-dreyna-lx3.corp.ad.wrs.com (147.11.216.91) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 23 May 2017 21:51:25 -0700 From: David Reyna To: Date: Tue, 23 May 2017 21:42:29 -0700 Message-ID: <1495600949-21134-1-git-send-email-david.reyna@windriver.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [147.11.216.91] Subject: [PATCH] toaster: get_last_build_id not called correctly X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 04:51:31 -0000 Content-Type: text/plain From: David Reyna The method "get_last_build_id" missing the "()" in several calls. This has been failing silently with Django 1.8 but intermittently crash with Django 1.9. [YOCTO #11570] Signed-off-by: David Reyna --- bitbake/lib/toaster/orm/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 6c5cfcd..a49f9a4 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -225,16 +225,16 @@ class Project(models.Model): return( -1 ) def get_last_outcome(self): - build_id = self.get_last_build_id + build_id = self.get_last_build_id() if (-1 == build_id): return( "" ) try: - return Build.objects.filter( id = self.get_last_build_id )[ 0 ].outcome + return Build.objects.filter( id = build_id )[ 0 ].outcome except (Build.DoesNotExist,IndexError): return( "not_found" ) def get_last_target(self): - build_id = self.get_last_build_id + build_id = self.get_last_build_id() if (-1 == build_id): return( "" ) try: @@ -243,7 +243,7 @@ class Project(models.Model): return( "not_found" ) def get_last_errors(self): - build_id = self.get_last_build_id + build_id = self.get_last_build_id() if (-1 == build_id): return( 0 ) try: @@ -252,7 +252,7 @@ class Project(models.Model): return( "not_found" ) def get_last_warnings(self): - build_id = self.get_last_build_id + build_id = self.get_last_build_id() if (-1 == build_id): return( 0 ) try: @@ -269,7 +269,7 @@ class Project(models.Model): return last_build.get_image_file_extensions() def get_last_imgfiles(self): - build_id = self.get_last_build_id + build_id = self.get_last_build_id() if (-1 == build_id): return( "" ) try: -- 1.9.1