summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-12-07 18:15:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 13:29:18 +0000
commitc80b7dfee230dc92bb7134620e0e12cc7f925614 (patch)
tree8f44875a776754113fc8f0c4095db9b46f4a8e7d /bitbake/lib/toaster
parent796e3481ada98df0532bbb6607d0879f658b0b85 (diff)
downloadpoky-c80b7dfee230dc92bb7134620e0e12cc7f925614.tar.gz
bitbake: toaster: orm get_project_layer_versions to return layer_version objects
Instead of returning layercommits return the actual Layer_Version objects for the layercommit as these are the useful objects which contain the metadata. (Bitbake rev: 480f0d307a3183df16fd383c7a3f96f00d09fbd4) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/orm/models.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index f826bcea34..874b58ecba 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -265,12 +265,13 @@ class Project(models.Model):
265 265
266 def get_project_layer_versions(self, pk=False): 266 def get_project_layer_versions(self, pk=False):
267 """ Returns the Layer_Versions currently added to this project """ 267 """ Returns the Layer_Versions currently added to this project """
268 layer_versions = self.projectlayer_set.all().values('layercommit') 268 layer_versions = self.projectlayer_set.all().values_list('layercommit',
269 flat=True)
269 270
270 if pk is False: 271 if pk is False:
271 return layer_versions 272 return Layer_Version.objects.filter(pk__in=layer_versions)
272 else: 273 else:
273 return layer_versions.values_list('layercommit__pk', flat=True) 274 return layer_versions
274 275
275 276
276 def get_available_machines(self): 277 def get_available_machines(self):