Skip to content

Commit

Permalink
fix: ensure DMPsection appears without dmp
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoStorm96 committed Sep 17, 2024
1 parent aa9d90b commit 6863740
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions proposals/utils/pdf_diff_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,7 @@ def create_context_pdf(context, model):
for num, document in enumerate(extra_documents):
sections.append(ExtraDocumentsSection(document, num))

if model.dmp_file:
sections.append(DMPFileSection(model))
sections.append(DMPFileSection(model))

sections.append(EmbargoSection(model))
sections.append(CommentsSection(model))
Expand Down Expand Up @@ -1209,14 +1208,13 @@ def create_context_diff(context, old_proposal, new_proposal):
)
)

if old_proposal.dmp_file or new_proposal.dmp_file:
sections.append(
DiffSection(
*multi_sections(
DMPFileSection, [old_proposal, new_proposal]
)
sections.append(
DiffSection(
*multi_sections(
DMPFileSection, [old_proposal, new_proposal]
)
)
)

sections.append(
DiffSection(EmbargoSection(old_proposal), EmbargoSection(new_proposal))
Expand Down

0 comments on commit 6863740

Please sign in to comment.