Fixed an UnboundLocalError issue.

- Legacy-Id: 18167
This commit is contained in:
Henrik Levkowetz 2020-07-14 12:06:14 +00:00
parent a7b3d9c83b
commit 2d6925f02f

View file

@ -640,6 +640,7 @@ class Document(DocumentInfo):
"""
if not hasattr(self, '_cached_absolute_url'):
name = self.name
url = None
if self.type_id == "draft" and self.get_state_slug() == "rfc":
name = self.canonical_name()
url = urlreverse('ietf.doc.views_doc.document_main', kwargs={ 'name': name }, urlconf="ietf.urls")