Skip to content

Commit

Permalink
only save xml on changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Sep 26, 2018
1 parent c60189a commit dd4a9dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def update_metadata
attribute_will_change!(:xml)
end

metadata.build(doi: self, xml: xml, namespace: schema_version) if xml.present?
metadata.build(doi: self, xml: xml, namespace: schema_version) if (changed & %w(xml)).present?
end

def set_defaults
Expand Down

0 comments on commit dd4a9dd

Please sign in to comment.