Rather than always outputting one of web_url or webscm_url, only output when these are present. This prevents us from emitting empty links if both are missing.
Signed-off-by: Jeremy Kerr <j...@ozlabs.org> --- patchwork/templates/patchwork/projects.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patchwork/templates/patchwork/projects.html b/patchwork/templates/patchwork/projects.html index afaf6ab..0db1227 100644 --- a/patchwork/templates/patchwork/projects.html +++ b/patchwork/templates/patchwork/projects.html @@ -30,7 +30,8 @@ </p> {% if p.web_url %} <p><a href="{{p.web_url}}">{{p.web_url}}</a></p> -{% else %} +{% endif %} +{% if p.webscm_url %} <p><a href="{{p.webscm_url}}">{{p.webscm_url}}</a></p> {% endif %} </div> -- 2.5.0 _______________________________________________ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork