diff options
author | 2014-04-06 14:59:06 +0100 | |
---|---|---|
committer | 2014-04-06 15:01:24 +0100 | |
commit | f7fa15dd365b8903b608834a536e2b83f3cef289 (patch) | |
tree | 3f5c108322045fd646b9f073f88985a8e049af53 /layerindex/models.py | |
parent | 4c08b28387fcf523048712cffca6f7aad16e6acc (diff) | |
download | openembedded-core-contrib-f7fa15dd365b8903b608834a536e2b83f3cef289.tar.gz |
Allow layers to have no master branch
With BSPs being "retired" e.g. in meta-intel, it is possible for layers
to not exist on the master branch; since this is legitimate we need the
layer index to handle it.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/models.py')
-rw-r--r-- | layerindex/models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/layerindex/models.py b/layerindex/models.py index ae9509ab2a..1f239033da 100644 --- a/layerindex/models.py +++ b/layerindex/models.py @@ -63,7 +63,10 @@ class LayerItem(models.Model): self.status = newstatus def get_layerbranch(self, branchname): - res = list(self.layerbranch_set.filter(branch__name=branchname)[:1]) + if branchname: + res = list(self.layerbranch_set.filter(branch__name=branchname)[:1]) + else: + res = list(self.layerbranch_set.all()[:1]) if res: return res[0] return None |