Skip to content

Commit 01afd80

Browse files
committed
Fix get_charter_text which wasn't actually working
- Legacy-Id: 3937
1 parent 0b5b5e6 commit 01afd80

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/group/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def get_charter_text(group):
3535
# get file path from settings. Syntesize file name from path, acronym, and suffix
3636
try:
3737
# Try getting charter from new charter tool
38-
charter = Document.objects.get(docalias__name="charter-ietf-%s" % self.acronym)
38+
from ietf.wgcharter.utils import get_charter_for_revision, approved_revision
39+
40+
charter = group.charter
3941
ch = get_charter_for_revision(charter, charter.rev)
4042
name = ch.name
4143
rev = approved_revision(ch.rev)
@@ -45,7 +47,7 @@ def get_charter_text(group):
4547
return desc
4648
except:
4749
try:
48-
filename = os.path.join(settings.IETFWG_DESCRIPTIONS_PATH, self.acronym) + ".desc.txt"
50+
filename = os.path.join(settings.IETFWG_DESCRIPTIONS_PATH, group.acronym) + ".desc.txt"
4951
desc_file = open(filename)
5052
desc = desc_file.read()
5153
except:

0 commit comments

Comments
 (0)