From 97ca386df10a522b21086b5605674d2cbefbbe3b Mon Sep 17 00:00:00 2001 From: Herman Fischer Date: Wed, 20 Mar 2024 16:03:36 -0700 Subject: [PATCH] block EdgarRenderer from processing invalid facts --- Filing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Filing.py b/Filing.py index 322b3238..20f7a69b 100644 --- a/Filing.py +++ b/Filing.py @@ -424,7 +424,9 @@ def factSortKey (fact): linesDiscarded=', '.join(discardedLineNumberList)) for fact in factSet: # we only want one thing, but we don't want to pop from the set so we "loop" and then break right away - if fact.concept is None: + if getattr(fact,"xValid", 0) < VALID: + continue + elif fact.concept is None: if not self.validatedForEFM: self.modelXbrl.error("xbrl:schemaImportMissing", # use standard Arelle message for this _("Instance fact missing schema definition: %(elements)s"), @@ -509,7 +511,7 @@ def factSortKey (fact): self.usedOrBrokenFactDefDict[fact].add(None) #now bad fact won't come back to bite us when processing isUncategorizedFacts continue # fact was rejected in first loop of this function because of problem with the Element - if fact.xValid < VALID: + if getattr(fact,"xValid", 0) < VALID: self.usedOrBrokenFactDefDict[fact].add(None) #now bad fact won't come back to bite us when processing isUncategorizedFacts continue