Skip to content

Commit 570ef78

Browse files
committed
Improved Document.get_file_path().
- Legacy-Id: 13059
1 parent d0b34eb commit 570ef78

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

ietf/doc/models.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ def file_extension(self):
9999
def get_file_path(self):
100100
if not hasattr(self, '_cached_file_path'):
101101
if self.type_id == "draft":
102-
if self.is_dochistory():
103-
self._cached_file_path = settings.INTERNET_ALL_DRAFTS_ARCHIVE_DIR
102+
if self.get_state_slug() == "rfc":
103+
self._cached_file_path = settings.RFC_PATH
104104
else:
105-
if self.get_state_slug() == "rfc":
106-
self._cached_file_path = settings.RFC_PATH
105+
state = self.get_state('draft')
106+
if not state or state.slug == 'active':
107+
self._cached_file_path = settings.INTERNET_DRAFT_PATH
107108
else:
108109
self._cached_file_path = settings.INTERNET_ALL_DRAFTS_ARCHIVE_DIR
109110
elif self.type_id in ("agenda", "minutes", "slides", "bluesheets") and self.meeting_related():

0 commit comments

Comments
 (0)