From 69f882d833d6dff9c59684734afcb3433b61e888 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Mon, 26 Jun 2023 13:03:59 -0500 Subject: [PATCH] chore: tweaks for rebuild_reference_relations --- ietf/doc/tests_utils.py | 4 ++-- ietf/doc/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ietf/doc/tests_utils.py b/ietf/doc/tests_utils.py index d27a4037e..b2147dcb6 100644 --- a/ietf/doc/tests_utils.py +++ b/ietf/doc/tests_utils.py @@ -325,7 +325,7 @@ class RebuildReferenceRelationsTests(TestCase): super().setUp() self.doc = WgDraftFactory() # document under test # Other documents that should be found by rebuild_reference_relations - self.normative, self.informative, self.unknown = WgRfcFactory.create_batch(3) + self.normative, self.informative, self.unknown = WgRfcFactory.create_batch(3) # AMHERE - these need to have rfc names. for relationship in ['refnorm', 'refinfo', 'refunk', 'refold']: self.doc.relateddocument_set.create( target=WgRfcFactory(), @@ -409,7 +409,7 @@ class RebuildReferenceRelationsTests(TestCase): self.assertEqual( result, { - 'warnings': ['There were 1 references with no matching DocAlias'], + 'warnings': ['There were 1 references with no matching Document'], 'unfound': ['draft-not-found'], } ) diff --git a/ietf/doc/utils.py b/ietf/doc/utils.py index 93ef393e1..982d2a99e 100644 --- a/ietf/doc/utils.py +++ b/ietf/doc/utils.py @@ -780,13 +780,13 @@ def rebuild_reference_relations(doc, filenames): unfound.add( "%s" % ref ) continue elif count > 1: - errors.append("Too many DocAlias objects found for %s"%ref) + errors.append("Too many Document objects found for %s"%ref) else: # Don't add references to ourself if doc != refdoc[0]: RelatedDocument.objects.get_or_create( source=doc, target=refdoc[ 0 ], relationship=DocRelationshipName.objects.get( slug='ref%s' % refType ) ) if unfound: - warnings.append('There were %d references with no matching DocAlias'%len(unfound)) + warnings.append('There were %d references with no matching Document'%len(unfound)) ret = {} if errors: