Closed goetzk closed 6 years ago
I should have mentioned - removing it might be the other possible fix!
This is related to #18
In dfe21a1612551c23f114d8bcc26feac405772d69 I've just commented out the line which adds a publisher element to submissions, the commit message is the text below:
In #16 (specifically cbf2a2cbf042735089ae817133ebf6c6bb8e8100) the codebase was changed
to forcibly add the "Default publisher" value to all submissions as it wasn't being (reliably)
added. In the rework for 2.1.0 (I'm looking at fd41e34efc7cc00a529c8f45ad22bb2b376d7768
but its other commits are relevant too) the behaviour changed and now publisher is added if
available.
This has resulted in the unfortunate situation that:
* If you have no publisher, none is added
* If you do have a publisher, a second is added
Not the situation we want:
* If you have no publisher, one is added
* If you have a publisher, nothing changes
This is not ideal. I've experimented a bit on the fix for these issues but don't have a good solution yet.
Now #39 is merged this can be achieved by commenting out the publisher validation, it will then silently fall through to the default. when the review screen mentioned in #38 comes to fruition it may be possible to have validation and default together.
There is half completed support for automatically adding a publisher to DOI minting ('publisher' configuration option); we should try and finish it.
There is a little complexity behind this problem unless we simply special case it.
overriding a map function isn't enough because it won't be called on failure. at the moment the only option for adding a missing publisher is to special case out the publisher check during validate_datacite or insert a function to add publisher to an item earlier on.