Skip to content

Commit cdd292a

Browse files
authored
Merge pull request #344 from zluuba/fix-empty-fields-on-pr
fix: add default values into pull_requests page
2 parents 4cbf3b8 + 6dd5f8f commit cdd292a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/components/tables/pull_requests_list.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@
3131
<tr>
3232
<th scope="row">{{ pr.num }}</th>
3333
<td class="col-3">
34-
<a href="{{ pr.html_url }}">{{ pr.info.title }}</a>
34+
{% with "Pull request #"|add:pr.id as default_value %}
35+
<a href="{{ pr.html_url }}">{{ pr.info.title|default:default_value }}</a>
36+
{% endwith %}
3537
</td>
3638
<td class="col-3">{{ pr.repository.full_name }}</td>
3739
<td class="col-2">
3840
<a href="{% url 'contributors:contributor_details' pr.contributor.login %}">{{ pr.contributor.login }}</a>
3941
</td>
4042
<td class="col-2">{{ pr.created_at|date:"d.m.Y" }}</td>
41-
<td class="col">{{ pr.info.state|capfirst }}</td>
43+
<td class="col">{{ pr.info.state|default:"open"|capfirst }}</td>
4244
</tr>
4345
{% empty %}
4446
<tr>

0 commit comments

Comments
 (0)