Skip to content

Commit 7e34b3c

Browse files
committed
Merged in [16599] from rjsparks@nostrum.com:
Correct the uploaded_filename for slides that go through the approve-proposed-slides workflow. - Legacy-Id: 16644 Note: SVN reference [16599] has been migrated to Git commit f6b05ae
1 parent 8a9e691 commit 7e34b3c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/meeting/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,14 +2482,14 @@ def approve_proposed_slides(request, slidesubmission_id, num):
24822482
if other_session != submission.session and not other_session.sessionpresentation_set.filter(document=doc).exists():
24832483
max_order = other_session.sessionpresentation_set.filter(document__type='slides').aggregate(Max('order'))['order__max'] or 0
24842484
other_session.sessionpresentation_set.create(document=doc,rev=doc.rev,order=max_order+1)
2485-
doc.uploaded_filename = submission.filename
2485+
sub_name, sub_ext = os.path.splitext(submission.filename)
2486+
target_filename = '%s-%s%s' % (sub_name[:sub_name.rfind('-ss')],doc.rev,sub_ext)
2487+
doc.uploaded_filename = target_filename
24862488
e = NewRevisionDocEvent.objects.create(doc=doc,by=submission.submitter,type='new_revision',desc='New revision available: %s'%doc.rev,rev=doc.rev)
24872489
doc.save_with_history([e])
24882490
path = os.path.join(submission.session.meeting.get_materials_path(),'slides')
24892491
if not os.path.exists(path):
24902492
os.makedirs(path)
2491-
sub_name, sub_ext = os.path.splitext(submission.filename)
2492-
target_filename = '%s-%s%s' % (sub_name[:sub_name.rfind('-ss')],doc.rev,sub_ext)
24932493
os.rename(submission.staged_filepath(), os.path.join(path, target_filename))
24942494
post_process(doc)
24952495
acronym = submission.session.group.acronym

0 commit comments

Comments
 (0)