chore: repair merge damage and adjust new files
This commit is contained in:
parent
f9c9644263
commit
ad1aabb4ad
|
@ -47,7 +47,7 @@ def draft_rev_at_time(iprdocrel):
|
|||
|
||||
@register.filter
|
||||
def no_revisions_message(iprdocrel):
|
||||
draft = iprdocrel.document.document
|
||||
draft = iprdocrel.document
|
||||
if draft.type_id != "draft" or iprdocrel.revisions.strip() != "":
|
||||
return ""
|
||||
rev_at_time, exception = draft_rev_at_time(iprdocrel)
|
||||
|
|
|
@ -15,6 +15,8 @@ from django.utils import timezone
|
|||
|
||||
import debug # pyflakes:ignore
|
||||
|
||||
from ietf.doc.models import Document
|
||||
|
||||
from ietf.doc.factories import (
|
||||
DocumentFactory,
|
||||
WgDraftFactory,
|
||||
|
@ -319,7 +321,7 @@ class IprTests(TestCase):
|
|||
|
||||
def test_new_specific_no_revision(self):
|
||||
draft = WgDraftFactory()
|
||||
WgRfcFactory()
|
||||
rfc = WgRfcFactory()
|
||||
url = urlreverse("ietf.ipr.views.new", kwargs={ "type": "specific" })
|
||||
|
||||
# successful post
|
||||
|
@ -333,8 +335,8 @@ class IprTests(TestCase):
|
|||
"ietfer_contact_info": "555-555-0101",
|
||||
"iprdocrel_set-TOTAL_FORMS": 2,
|
||||
"iprdocrel_set-INITIAL_FORMS": 0,
|
||||
"iprdocrel_set-0-document": draft.docalias.first().pk,
|
||||
"iprdocrel_set-1-document": DocAlias.objects.filter(name__startswith="rfc").first().pk,
|
||||
"iprdocrel_set-0-document": draft.pk,
|
||||
"iprdocrel_set-1-document": rfc.pk,
|
||||
"patent_number": "SE12345678901",
|
||||
"patent_inventor": "A. Nonymous",
|
||||
"patent_title": "A method of transferring bits",
|
||||
|
@ -813,7 +815,7 @@ Subject: test
|
|||
NewRevisionDocEventFactory(doc=draft, rev=f"{rev:02d}", time=now-datetime.timedelta(days=30*(2-rev)))
|
||||
|
||||
# Disclosure has non-empty revisions field on its related draft
|
||||
iprdocrel = IprDocRelFactory(document=draft.docalias.first())
|
||||
iprdocrel = IprDocRelFactory(document=draft)
|
||||
IprEventFactory(type_id="posted",time=now,disclosure=iprdocrel.disclosure)
|
||||
self.assertEqual(
|
||||
no_revisions_message(iprdocrel),
|
||||
|
|
|
@ -11,7 +11,7 @@ from pathlib import Path
|
|||
from django.core.management.base import BaseCommand
|
||||
from django.conf import settings
|
||||
|
||||
from ietf.doc.models import Document, DocAlias, DocEvent
|
||||
from ietf.doc.models import Document, DocEvent
|
||||
from ietf.meeting.models import Meeting, Session
|
||||
|
||||
|
||||
|
@ -212,7 +212,6 @@ class Command(BaseCommand):
|
|||
rev="00",
|
||||
uploaded_filename=agenda_filename,
|
||||
)
|
||||
DocAlias.objects.create(name=doc.name).docs.add(doc)
|
||||
e = DocEvent.objects.create(
|
||||
type="comment",
|
||||
doc=doc,
|
||||
|
|
Loading…
Reference in a new issue