Skip to content

Commit b7fba37

Browse files
committed
Added a guard to prevent problems with legacy drafts without any draft state.
- Legacy-Id: 13318
1 parent 7925822 commit b7fba37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/doc/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ def get_file_path(self):
106106
if self.get_state_slug() == "rfc":
107107
self._cached_file_path = settings.RFC_PATH
108108
else:
109-
if self.get_state('draft').slug == 'active':
109+
draft_state = self.get_state('draft')
110+
if draft_state and draft_state.slug == 'active':
110111
self._cached_file_path = settings.INTERNET_DRAFT_PATH
111112
else:
112113
self._cached_file_path = settings.INTERNET_ALL_DRAFTS_ARCHIVE_DIR

0 commit comments

Comments
 (0)