Skip to content

Commit 7ffe5d7

Browse files
jk-ozlabsstephenfin
authored andcommitted
templates: don't emit tags for empty URLs, allow both web_url & webscm_url
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 <[email protected]> Acked-by: Stephen Finucane <[email protected]>
1 parent c4b8696 commit 7ffe5d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

patchwork/templates/patchwork/projects.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ <h3>{{p.name}}</h3>
3030
</p>
3131
{% if p.web_url %}
3232
<p><a href="{{p.web_url}}">{{p.web_url}}</a></p>
33-
{% else %}
33+
{% endif %}
34+
{% if p.webscm_url %}
3435
<p><a href="{{p.webscm_url}}">{{p.webscm_url}}</a></p>
3536
{% endif %}
3637
</div>

0 commit comments

Comments
 (0)