Skip to content

Commit 893471d

Browse files
committed
Bug fixes from Martin Qvist
- Legacy-Id: 3167
1 parent 52b57f1 commit 893471d

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/idrfc/views_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def all(request):
507507
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
508508
active = (dict(filename=n) for n in InternetDraft.objects.filter(state="active").order_by("name").values_list('name', flat=True))
509509
rfc1 = (dict(filename=d, rfc_number=int(n[3:])) for d, n in DocAlias.objects.filter(document__state="rfc", name__startswith="rfc").exclude(document__name__startswith="rfc").order_by("document__name").values_list('document__name','name').distinct())
510-
rfc2 = (dict(rfc_number=r, draft=None) for r in sorted(int(n[3:]) for n in Document.objects.filter(name__startswith="rfc").values_list('name', flat=True)))
510+
rfc2 = (dict(rfc_number=r, draft=None) for r in sorted(int(n[3:]) for n in Document.objects.filter(type="draft", name__startswith="rfc").values_list('name', flat=True)))
511511
dead = InternetDraft.objects.exclude(state__in=("active", "rfc")).select_related("state").order_by("name")
512512
else:
513513
active = InternetDraft.objects.all().filter(status=1).order_by("filename").values('filename')

redesign/doc/proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class InternetDraft(Document):
1616
job_owner="ad",
1717
rfc_number=lambda v: ("docalias__name", "rfc%s" % v),
1818
cur_state="iesg_state__order",
19-
))
19+
), always_filter=dict(type="draft"))
2020

2121
DAYS_TO_EXPIRE=185
2222

redesign/group/proxy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ def chairs(self): # return a set of WGChair objects for this work group
173173
# def drafts(self): # return a set of Rfc objects for this group
174174
# return InternetDraft.objects.filter(group__exact=self.group_acronym)
175175
def charter_text(self): # return string containing WG description read from file
176+
import os
177+
from django.conf import settings
176178
# get file path from settings. Syntesize file name from path, acronym, and suffix
177179
try:
178180
filename = os.path.join(settings.IETFWG_DESCRIPTIONS_PATH, self.acronym) + ".desc.txt"

0 commit comments

Comments
 (0)