Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id BA2E8E00BEE; Tue, 13 Oct 2015 03:25:35 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 7BF89E00AD5 for ; Tue, 13 Oct 2015 03:25:23 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 13 Oct 2015 03:25:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,677,1437462000"; d="scan'208";a="579684207" Received: from mjbowe-mobl.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.18.22]) by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2015 03:25:21 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Tue, 13 Oct 2015 11:24:54 +0100 Message-Id: <1444731895-11775-10-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1444731895-11775-1-git-send-email-elliot.smith@intel.com> References: <1444731895-11775-1-git-send-email-elliot.smith@intel.com> Subject: [review-request][PATCH 09/10] toaster: Exclude "command line builds" project from projects typeahead 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, 13 Oct 2015 10:25:35 -0000 The "New build" drop-down provides autocomplete for Toaster projects. However, it should not include the default project (for command line builds), as it should not be possible for the user to select this project as the container for a Toaster build. [YOCTO #8231] Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh --- bitbake/lib/toaster/toastergui/typeaheads.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/typeaheads.py b/bitbake/lib/toaster/toastergui/typeaheads.py index 9db3182..dd4b7f5 100644 --- a/bitbake/lib/toaster/toastergui/typeaheads.py +++ b/bitbake/lib/toaster/toastergui/typeaheads.py @@ -121,12 +121,12 @@ class RecipesTypeAhead(ToasterTypeAhead): return results class ProjectsTypeAhead(ToasterTypeAhead): - """ Typeahead for all the projects """ + """ Typeahead for all the projects, except for command line builds """ def __init__(self): super(ProjectsTypeAhead, self).__init__() def apply_search(self, search_term, prj, request): - projects = Project.objects.all().order_by("name") + projects = Project.objects.exclude(is_default=True).order_by("name") primary_results = projects.filter(name__istartswith=search_term) secondary_results = projects.filter(name__icontains=search_term).exclude(pk__in=primary_results) -- Elliot Smith Software Engineer Intel OTC --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.