[Patchew-devel] [PATCH] git: allow not passing the URL to applier-report

Paolo Bonzini pbonzini at redhat.com
Fri Jan 11 10:02:32 UTC 2019


The applier-report handler tried to use the URL template from the project, but there
was a bug in the logic to do so.  Fix it.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 mods/git.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mods/git.py b/mods/git.py
index a163062..4f3236b 100644
--- a/mods/git.py
+++ b/mods/git.py
@@ -273,9 +273,10 @@ class ApplierReportView(APILoginRequiredView):
             data['tag'] = 'refs/tags/' + tag
             if url:
                 data['url'] = url
-            elif url_template and tag:
+            elif tag:
                 url_template = p.get_property("git.url_template")
-                data['url'] = url_template.replace("%t", tag)
+                if url_template:
+                    data['url'] = url_template.replace("%t", tag)
             if base:
                 data['base'] = base
             r.status = Result.SUCCESS
-- 
2.20.1




More information about the Patchew-devel mailing list