fix: correct cache variable assignment

This commit is contained in:
Robert Sparks 2023-09-13 15:46:21 -05:00
parent a571151b03
commit 92ea5a6a89
No known key found for this signature in database
GPG key ID: 6E2A6A5775F91318

View file

@ -674,7 +674,7 @@ class DocumentInfo(models.Model):
def came_from_draft(self):
if not hasattr(self, "_cached_came_from_draft"):
doc = self if isinstance(self, Document) else self.doc
self.cached_came_from_draft = next(iter(doc.related_that("became_rfc")), None)
self._cached_came_from_draft = next(iter(doc.related_that("became_rfc")), None)
return self._cached_came_from_draft
class Meta: