From 47b3b8b14539f5e70e14b5c9f7e67112ecb065ad Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 26 Sep 2018 12:16:58 +0200 Subject: [PATCH] remove logging --- app/controllers/dois_controller.rb | 2 +- app/models/doi.rb | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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