Skip to content

Commit

Permalink
[foliaupgrade] set src and format attributes on pre-upgraded version …
Browse files Browse the repository at this point in the history
…in provenance chain
  • Loading branch information
proycon committed Apr 15, 2019
1 parent 3ae3985 commit 4f57c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion foliatools/foliaupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def upgrade(doc, upgradeprocessor):

if not doc.provenance or (len(doc.provenance) == 1 and doc.provenance.processors[0] == upgradeprocessor):
#add a datasource processor as the first one
doc.provenance.insert(0, folia.Processor(doc.id + ".source", folia_version=doc.version, type=folia.ProcessorType.DATASOURCE))
doc.provenance.insert(0, folia.Processor(doc.id + ".pre-upgrade", folia_version=doc.version, type=folia.ProcessorType.DATASOURCE, src=doc.filename, format="text/folia+xml"))

#bump the version number
doc.version = folia.FOLIAVERSION
Expand Down

0 comments on commit 4f57c40

Please sign in to comment.