Skip to content

Commit d13d878

Browse files
committed
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
1 parent c91aa54 commit d13d878

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
@@ -371,7 +371,8 @@ def rfc_number(self):
371371
if n.startswith("rfc"):
372372
self._cached_rfc_number = n[3:]
373373
else:
374-
logger.error("Document self.is_rfc() is True but self.canonical_name() is %s" % n)
374+
if isinstance(self,Document):
375+
logger.error("Document self.is_rfc() is True but self.canonical_name() is %s" % n)
375376
return self._cached_rfc_number
376377

377378
@property

0 commit comments

Comments
 (0)