Skip to content

Commit a3e2da7

Browse files
committed
select_related() on IDInternal eliminates most of the relevant rows
due to missing data in other tables, so instead, select on InternetDrafts. This is a little confusing, since the two halves of the page have different types of objects. Also add the intended_status, which was also missing in this template. - Legacy-Id: 532
1 parent 2ab8c03 commit a3e2da7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ietf/iesg/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
date_threshold = datetime.datetime.now().date() - datetime.timedelta(days=185)
99

1010
def inddocs(request):
11-
queryset_list_ind = IDInternal.objects.filter(via_rfc_editor = 1,rfc_flag=0,noproblem=1, dnp=0).select_related().order_by('-internet_drafts.b_approve_date')
11+
queryset_list_ind = InternetDraft.objects.filter(idinternal__via_rfc_editor=1, idinternal__rfc_flag=0, idinternal__noproblem=1, idinternal__dnp=0).order_by('-b_approve_date')
1212
queryset_list_ind_dnp = IDInternal.objects.filter(via_rfc_editor = 1,rfc_flag=0,dnp=1).order_by('-dnp_date')
1313
return object_list(request, queryset=queryset_list_ind, template_name='iesg/independent_doc.html', allow_empty=True, extra_context={'object_list_dnp':queryset_list_ind_dnp })
1414

ietf/templates/iesg/independent_doc.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
<h3>Positive IESG Response</h3>
1010

11-
{% regroup object_list by draft.b_approve_date|date:"F j, Y" as dates %}
11+
{% regroup object_list by b_approve_date|date:"F j, Y" as dates %}
1212
{% for date in dates %}
1313
<b>Date Sent: {{ date.grouper }}</b>
1414
<ul>
1515
{% for item in date.list %}
16-
<li><a href="/iesg/ann/detail/{{ item.ballot_id }}/">{{ item.draft.title }}</a>
16+
<li><a href="/iesg/ann/detail/{{ item.idinternal.ballot_id }}/">{{ item.title }} ({{ item.intended_status }})</a>
1717
{% endfor %}
1818
</ul>
1919
{% endfor %}
@@ -26,7 +26,7 @@ <h3>Negative IESG Responses</h3>
2626
<b>Date Sent: {{ date.grouper }}</b>
2727
<ul>
2828
{% for item in date.list %}
29-
<li><a href="/iesg/ann/detail/{{ item.ballot_id }}/">{{ item.draft.title }}</a>
29+
<li><a href="/iesg/ann/detail/{{ item.ballot_id }}/">{{ item.draft.title }} ({{item.draft.intended_status }})</a>
3030
{% endfor %}
3131
</ul>
3232
{% endfor %}

0 commit comments

Comments
 (0)