When using the doi:import_one rake task, DOIs may save with null in the publisher column and {} in the publisher_obj column. The original publisher value is still present in the XML after the save.
Expected Behaviour
publisher is populated with the XML publisher property contents and publisher_obj contains a populated hash.
Current Behaviour
Steps to Reproduce
Create a DOI and then run the doi:import_one command on the DOI.
Context (Environment)
Screenshots
Further details
The DataCite JSON will also contain the following value for publisher:
"publisher": {
"name": ""
},
Proposal
Hypothesis
Because the publisher_before_type_cast keys don't appear symbolized here, there are downstream errors:
Describe the bug
When using the
doi:import_one
rake task, DOIs may save withnull
in thepublisher
column and{}
in thepublisher_obj
column. The original publisher value is still present in the XML after the save.Expected Behaviour
publisher
is populated with the XMLpublisher
property contents andpublisher_obj
contains a populated hash.Current Behaviour
Steps to Reproduce
Create a DOI and then run the
doi:import_one
command on the DOI.Context (Environment)
Screenshots
Further details
The DataCite JSON will also contain the following value for
publisher
:Proposal
Hypothesis
Because the
publisher_before_type_cast
keys don't appear symbolized here, there are downstream errors:https://github.com/datacite/lupo/blob/f60a480abbd56bbfb2cf60f1985cee5e7ee6548a/app/models/doi.rb#L2510-L2522
Possible Implementation