Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
Refactor Preservable#build_provenanceMetadata_datastream
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Nov 12, 2016
1 parent 7829270 commit 5cf18b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/dor/models/preservable.rb
Expand Up @@ -11,11 +11,9 @@ module Preservable

def build_provenanceMetadata_datastream(workflow_id, event_text)
workflow_provenance = create_workflow_provenance(workflow_id, event_text)
dsname = 'provenanceMetadata'
ds = datastreams[dsname]
ds.label = 'Provenance Metadata' unless datastreams.keys.include?(dsname)
ds = datastreams['provenanceMetadata']
ds.label ||= 'Provenance Metadata'
ds.ng_xml = workflow_provenance
ds.content = ds.ng_xml.to_s
ds.save
end

Expand Down

0 comments on commit 5cf18b9

Please sign in to comment.