recipes: allow searching for layer:oe-core

When using the layer: advanced query term, if you want to match on
OE-Core, its actual layer name is "openembedded-core", but people will
naturally assume that "oe-core" should work, so make it so (case
insensitive).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2019-11-20 12:11:12 +13:00
parent 745ffd6958
commit bc653605fc

View File

@ -569,6 +569,8 @@ layer name is expected to follow the \"layer:\" prefix without any spaces.')
else:
query_layer = LayerItem.objects.filter(
name=query_layername)
if query_layername == 'oe-core' and not query_layer:
query_layer = LayerItem.objects.filter(name='openembedded-core')
if query_layer:
init_qs = init_qs.filter(
layerbranch__layer=query_layer[0])