Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id B563BE00B02; Tue, 8 Dec 2015 13:16:38 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.45 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2B0E3E00AF4 for ; Tue, 8 Dec 2015 13:16:34 -0800 (PST) Received: by pacej9 with SMTP id ej9so17856995pac.2 for ; Tue, 08 Dec 2015 13:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J2bEmV7dVolm1iS30GzhLoBFoYHunQ8KRUkeyr2enRA=; b=rVNOJvKr5zpEdtT/IHje2chrlpVUpL3lOxNf5yUGYJPzDEnA41yqtB51wcDTVagxUq wQgVbNF88QnZ2BNXV1vqZ+6G/50fqrmgcSVd8lWXYgpuNtwZc5jcCOlgYnQGH8HvoE3E DhaV/znrTLfNCAoAk66PFzRxHDw0TTYp8wCNEPFqvreQW7ywvnnuvEcO2F4Bkp/OIJta 6MsnIyrbjglIqLRfESF8n3RuZbwK+JQWh4O1L9MFpJnh4Dm+m1BScpD7AI5ANKXZ6D90 Aec6iV2NdW9HlYQGxEGro1ZQ1QzNXQhNE2nDp0rf449kAB1VJIG3cqmt+Aq7OxsAbGlp Nszw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=J2bEmV7dVolm1iS30GzhLoBFoYHunQ8KRUkeyr2enRA=; b=L6jgnGxRjkC7n7Z9JH0hdA1RufzzKXB/xQcB1JFUGUcEW8VNWhn1HZG84tyQjigZBw yDnz/xiGHMyZ6Ck/oV8JdRRrAtUg8YyApezVMrq6RyDlancc1maMVxvbf/nFrq5OSaYe NsUq83AlhJDECP5wwCZhliauO6vZXxeYMCyJ4wNgeX5t6xspGUE2y8idkr7U4zW2za1T mSM3NUmexratUvDLVALNJQZmg++RbV5hxt2jL2iv00dMNVH9VGYrVu2Htq+Ufl5Ybt8Y VLYhMwsYHC4HOP1ZlLHeNQJh3IWeo7aZaSgypv/LNCVMV3thwdAJKhF9UbFnOhgTYnZD Hgtg== X-Gm-Message-State: ALoCoQkPIKZtsCV2A09ymauCf7tPCO8zVGYh1VN5qwD/JFYI12wQEg/Zpj76XeZdcAKnHdq6Q7ANHFCQuopD8J/s3p86SShrjg== X-Received: by 10.66.160.168 with SMTP id xl8mr3040173pab.116.1449609394477; Tue, 08 Dec 2015 13:16:34 -0800 (PST) Received: from draco.ger.corp.intel.com ([192.55.54.40]) by smtp.gmail.com with ESMTPSA id v64sm6675766pfi.50.2015.12.08.13.16.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Dec 2015 13:16:33 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 8 Dec 2015 21:15:48 +0000 Message-Id: <1449609380-11073-3-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449609380-11073-1-git-send-email-michael.g.wood@intel.com> References: <1449609380-11073-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 02/34] toaster: models fall back to a sensible string for no vcs reference 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: Tue, 08 Dec 2015 21:16:38 -0000 Fall back to a 'n/a' string for the vcs reference, not all our source has to be in a vcs and therefore it is legitimate for this to be none. Signed-off-by: Michael Wood --- bitbake/lib/toaster/orm/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 0174233..a4b0557 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1186,7 +1186,7 @@ class Layer_Version(models.Model): return self.up_branch.name if self.commit is not None and len(self.commit) > 0: return self.commit - return ("Cannot determine the vcs_reference for layer version %s" % vars(self)) + return 'N/A' def get_detailspage_url(self, project_id): return reverse('layerdetails', args=(project_id, self.pk)) -- 2.1.4