diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index e089890ee..543516094 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -197,7 +197,7 @@ def validate def create logger = Logger.new(STDOUT) - logger.info safe_params.inspect + # logger.info safe_params.inspect @doi = Doi.new(safe_params) authorize! :create, @doi diff --git a/app/models/doi.rb b/app/models/doi.rb index 628ca344d..7ed51f379 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -473,8 +473,6 @@ def self.register_all_urls(limit: nil) # update metadata when any virtual attribute has changed def update_metadata - logger = Logger.new(STDOUT) - changed_virtual_attributes = changed & %w(author title publisher date_published additional_type resource_type_general description content_size content_format) if changed_virtual_attributes.present? @@ -484,7 +482,7 @@ def update_metadata @schema_version = Array.wrap(ns).last || "http://datacite.org/schema/kernel-4" attribute_will_change!(:xml) end - logger.info xml + metadata.build(doi: self, xml: xml, namespace: schema_version) if xml.present? end