Only log an error for is_rfc vs canonical_name mismatch for Document objects - it's OK for DocHistory to have the mismatch given how DocHistory computes is_rfc()

- Legacy-Id: 18903
This commit is contained in:
Robert Sparks 2021-03-06 16:18:01 +00:00
parent c91aa543c4
commit d13d878103

View file

@ -371,7 +371,8 @@ class DocumentInfo(models.Model):
if n.startswith("rfc"):
self._cached_rfc_number = n[3:]
else:
logger.error("Document self.is_rfc() is True but self.canonical_name() is %s" % n)
if isinstance(self,Document):
logger.error("Document self.is_rfc() is True but self.canonical_name() is %s" % n)
return self._cached_rfc_number
@property