mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:19:02 +02:00
Fix tree link on layer list for layers with no subdirectory
We always need to replace %path% in the URL, not just when there is a non-blank path to replace it with. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
aa2c67c92d
commit
dcd312b9fb
|
@ -143,10 +143,9 @@ class LayerBranch(models.Model):
|
|||
if '%path%' in base_url:
|
||||
if extra_path:
|
||||
url = re.sub(r'\[([^\]]*%path%[^\]]*)\]', '\\1', url)
|
||||
return url.replace('%path%', extra_path)
|
||||
else:
|
||||
url = re.sub(r'\[([^\]]*%path%[^\]]*)\]', '', url)
|
||||
return url
|
||||
return url.replace('%path%', extra_path)
|
||||
else:
|
||||
return url + extra_path
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue
Block a user