Skip to content

Commit 0fea5e0

Browse files
committed
Use doc.canonical_name() rather than generating the file name from the group acronym.
- Legacy-Id: 4219
1 parent fc921ec commit 0fea5e0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

ietf/idrfc/views_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def document_main(request, name, rev=None):
121121

122122

123123
if doc.type_id == "charter":
124-
filename = doc.name + "-" + doc.rev + ".txt"
124+
filename = "%s-%s.txt" % (doc.canonical_name(), doc.rev)
125125

126126
content = _get_html(filename, os.path.join(settings.CHARTER_PATH, filename), split=False)
127127

ietf/wgcharter/views_ballot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def default_action_text(wg, charter, user, action):
3737
info['list_subscribe'] = str(wg.list_subscribe) if wg.list_subscribe else None,
3838
info['list_archive'] = str(wg.list_archive) if wg.list_archive else None,
3939

40-
filename = os.path.join(settings.CHARTER_PATH, 'charter-ietf-%s-%s.txt' % (wg.acronym, wg.charter.rev))
40+
filename = os.path.join(settings.CHARTER_PATH, '%s-%s.txt' % (wg.charter.canonical_name(), wg.charter.rev))
4141
try:
4242
charter_text = open(filename, 'r')
4343
info['charter_txt'] = charter_text.read()
@@ -70,7 +70,7 @@ def default_review_text(wg, charter, user):
7070

7171
info['bydate'] = (date.today() + timedelta(weeks=1)).isoformat()
7272

73-
filename = os.path.join(settings.CHARTER_PATH, 'charter-ietf-%s-%s.txt' % (wg.acronym, wg.charter.rev))
73+
filename = os.path.join(settings.CHARTER_PATH, '%s-%s.txt' % (wg.charter.canonical_name(), wg.charter.rev))
7474
try:
7575
charter_text = open(filename, 'r')
7676
info['charter_txt'] = charter_text.read()

ietf/wginfo/edit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def diff(attr, name):
139139
save_document_in_history(c)
140140
# and add a DocAlias
141141
DocAlias.objects.create(
142-
name = "charter-ietf-%s" % r['acronym'],
143-
document = charter
142+
name="charter-ietf-%s" % r['acronym'],
143+
document=charter,
144144
)
145145

146146
# update the attributes, keeping track of what we're doing

0 commit comments

Comments
 (0)