]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: models Allow the machine's layer name to be searched
authorMichael Wood <michael.g.wood@intel.com>
Thu, 5 Feb 2015 14:24:01 +0000 (14:24 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 9 Feb 2015 17:54:34 +0000 (17:54 +0000)
Make the layer name searchable. If you know the name of the layer you are
interested in, searching for it is a fast way of getting the list of
machines provided by it.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
lib/toaster/orm/models.py

index ad7a8569f25897565fd7a8fc9572c7bdb1432cc9..4bb84bd5efe35a48024f63f8c686c6f5fdba1866 100644 (file)
@@ -529,7 +529,7 @@ class Recipe_Dependency(models.Model):
 
 
 class Machine(models.Model):
-    search_allowed_fields = ["name", "description"]
+    search_allowed_fields = ["name", "description", "layer_version__layer__name"]
     layer_source = models.ForeignKey('LayerSource', default = None, null = True)  # from where did we get this machine
     up_id = models.IntegerField(null = True, default = None)                      # id of entry in the source
     up_date = models.DateTimeField(null = True, default = None)