Merged in [8238] from rjsparks@nostrum.com:\n Look in the right place in the filesystem for the files bits when building reference relations during submit. Fixes bug #1467.
- Legacy-Id: 8362 Note: SVN reference [8238] has been migrated to Git commit c6e22bc429e3c77fd2d5be6d78c20a0c90cbc80b
This commit is contained in:
parent
3b59ccf910
commit
8e0200abc9
|
@ -357,14 +357,15 @@ def update_telechat(request, doc, by, new_telechat_date, new_returning_item=None
|
|||
|
||||
e.save()
|
||||
|
||||
def rebuild_reference_relations(doc):
|
||||
def rebuild_reference_relations(doc,filename=None):
|
||||
if doc.type.slug != 'draft':
|
||||
return None
|
||||
|
||||
if doc.get_state_slug() == 'rfc':
|
||||
filename=os.path.join(settings.RFC_PATH,doc.canonical_name()+".txt")
|
||||
else:
|
||||
filename=os.path.join(settings.INTERNET_DRAFT_PATH,doc.filename_with_rev())
|
||||
if not filename:
|
||||
if doc.get_state_slug() == 'rfc':
|
||||
filename=os.path.join(settings.RFC_PATH,doc.canonical_name()+".txt")
|
||||
else:
|
||||
filename=os.path.join(settings.INTERNET_DRAFT_PATH,doc.filename_with_rev())
|
||||
|
||||
try:
|
||||
refs = draft.Draft(draft._gettext(filename), filename).get_refs()
|
||||
|
|
|
@ -159,7 +159,7 @@ def post_submission(request, submission):
|
|||
|
||||
update_authors(draft, submission)
|
||||
|
||||
trouble = rebuild_reference_relations(draft)
|
||||
trouble = rebuild_reference_relations(draft, filename=os.path.join(settings.IDSUBMIT_STAGING_PATH, '%s-%s.txt' % (submission.name, submission.rev)))
|
||||
if trouble:
|
||||
log('Rebuild_reference_relations trouble: %s'%trouble)
|
||||
|
||||
|
|
Loading…
Reference in a new issue