Skip to content

Commit

Permalink
Set status to published when an export occurs on the issue with the p…
Browse files Browse the repository at this point in the history
…aper.
  • Loading branch information
kmccurley committed Dec 11, 2024
1 parent 0b1a1ed commit 3e5dc21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webapp/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def export_issue(data_path: Path, output_path: Path, issue: Issue) -> datetime:
ET.indent(jats_elem, space=' ', level=0)
jats_str = ET.tostring(jats_elem, encoding='utf-8').decode('utf-8')
zip_file.writestr('{}/jats.xml'.format(paperstatus.paperno), jats_str)
paperstatus.status = PaperStatusEnum.PUBLISHED
db.session.add(paperstatus) # the commit occurs if and when the issue is updated.
zip_file.writestr('issue.json', json.dumps(issuedata, indent=2, default=_datetime_serialize))
zip_file.close()
return now
Expand Down

0 comments on commit 3e5dc21

Please sign in to comment.