Improved Document.get_file_path().
- Legacy-Id: 13059
This commit is contained in:
parent
d0b34ebd45
commit
570ef785d6
|
@ -99,11 +99,12 @@ class DocumentInfo(models.Model):
|
|||
def get_file_path(self):
|
||||
if not hasattr(self, '_cached_file_path'):
|
||||
if self.type_id == "draft":
|
||||
if self.is_dochistory():
|
||||
self._cached_file_path = settings.INTERNET_ALL_DRAFTS_ARCHIVE_DIR
|
||||
if self.get_state_slug() == "rfc":
|
||||
self._cached_file_path = settings.RFC_PATH
|
||||
else:
|
||||
if self.get_state_slug() == "rfc":
|
||||
self._cached_file_path = settings.RFC_PATH
|
||||
state = self.get_state('draft')
|
||||
if not state or state.slug == 'active':
|
||||
self._cached_file_path = settings.INTERNET_DRAFT_PATH
|
||||
else:
|
||||
self._cached_file_path = settings.INTERNET_ALL_DRAFTS_ARCHIVE_DIR
|
||||
elif self.type_id in ("agenda", "minutes", "slides", "bluesheets") and self.meeting_related():
|
||||
|
|
Loading…
Reference in a new issue