Merge pull request #6309 from rjsparks/crawl-fixes
fix: missed docalias artifact removal. Better use of became_rfc.
This commit is contained in:
commit
b635045aab
|
@ -354,14 +354,11 @@ class DocumentInfo(models.Model):
|
|||
iesg_state_summary = iesg_state.name
|
||||
if iesg_substate:
|
||||
iesg_state_summary = iesg_state_summary + "::"+"::".join(tag.name for tag in iesg_substate)
|
||||
|
||||
if state.slug == "rfc":
|
||||
rfcs = self.related_that_doc("became_rfc") # should be only one
|
||||
if len(rfcs) > 0:
|
||||
rfc = rfcs[0].document
|
||||
return f"Became RFC {rfc.rfc_number} ({rfc.std_level})"
|
||||
else:
|
||||
return "Became RFC"
|
||||
|
||||
rfc = self.became_rfc()
|
||||
if rfc:
|
||||
return f"Became RFC {rfc.rfc_number} ({rfc.std_level})"
|
||||
|
||||
elif state.slug == "repl":
|
||||
rs = self.related_that("replaces")
|
||||
if rs:
|
||||
|
|
|
@ -148,8 +148,8 @@ def fill_in_document_table_attributes(docs, have_telechat_date=False):
|
|||
)
|
||||
# TODO - this likely reduces to something even simpler
|
||||
rel_rfcs = {
|
||||
a.document.id: re.sub(r"rfc(\d+)", r"RFC \1", a.name, flags=re.IGNORECASE)
|
||||
for a in Document.objects.filter(
|
||||
d.id: re.sub(r"rfc(\d+)", r"RFC \1", d.name, flags=re.IGNORECASE)
|
||||
for d in Document.objects.filter(
|
||||
type_id="rfc", id__in=[rel.source_id for rel in xed_by]
|
||||
)
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ def augment_docs_with_related_docs_info(docs):
|
|||
if d.type_id == 'conflrev':
|
||||
if len(d.related_that_doc('conflrev')) != 1:
|
||||
continue
|
||||
originalDoc = d.related_that_doc('conflrev')[0].document
|
||||
originalDoc = d.related_that_doc('conflrev')[0]
|
||||
d.pages = originalDoc.pages
|
||||
|
||||
def prepare_document_table(request, docs, query=None, max_results=200):
|
||||
|
|
Loading…
Reference in a new issue