From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 2F8F5E00AE9; Wed, 30 Sep 2015 02:21:44 -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 EA582E00AE9 for ; Wed, 30 Sep 2015 02:21:39 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 30 Sep 2015 02:21:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,611,1437462000"; d="scan'208";a="654952241" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga003.jf.intel.com with ESMTP; 30 Sep 2015 02:21:39 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by irsmsx110.ger.corp.intel.com (163.33.3.25) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 30 Sep 2015 10:21:36 +0100 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.164]) by irsmsx155.ger.corp.intel.com ([169.254.14.173]) with mapi id 14.03.0248.002; Wed, 30 Sep 2015 10:21:36 +0100 From: "Barros Pena, Belen" To: "Wood, Michael G" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH] toaster: orm Machines filter don't pass self in as parameter Thread-Index: AQHQ+2FnyEt4AHkSt0qCJaN7TZ7Zzg== Date: Wed, 30 Sep 2015 09:21:35 +0000 Message-ID: References: <1443543524-26744-1-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1443543524-26744-1-git-send-email-michael.g.wood@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.5.150821 x-originating-ip: [10.237.224.32] MIME-Version: 1.0 Subject: Re: [PATCH] toaster: orm Machines filter don't pass self in as parameter 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, 30 Sep 2015 09:21:44 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable On 29/09/2015 17:18, "toaster-bounces@yoctoproject.org on behalf of Michael Wood" wrote: >Fix typo don't pass self in as a parameter, this evaluated to true >giving the wrong results meaning the machines typeahead did not return >valid results. I am not sure if it is connected to this problem, but I can only set machines if I select one of the type ahead suggestions. This is not the correct behaviour. Machines are like build targets: we can never be sure that Toaster knows of all valid options. Therefore, we need to allow free text entry.=20 Right now, if type some random string in the machine field then click 'save', Toaster reverts to the previous value and refuses to take the new one. This also means that, for a local project, where we don't have any information about machines, it is impossible to change the machine value. Cheers, Bel=E9n > >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 5aed158..f5529e2 100644 >--- a/bitbake/lib/toaster/orm/models.py >+++ b/bitbake/lib/toaster/orm/models.py >@@ -229,7 +229,7 @@ class Project(models.Model): > """ Returns QuerySet of all Machines which are provided by the > Layers currently added to the Project """ > queryset =3D Machine.objects.filter( >- layer_version__in=3Dself.get_project_layer_versions(self)) >+ layer_version__in=3Dself.get_project_layer_versions()) >=20 > return queryset >=20 >--=20 >2.1.4 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster