Trying to fix the issue reported at
https://support.d4science.org/issues/19763#note-12
This commit is contained in:
parent
db79604770
commit
e55251dfbb
|
@ -240,14 +240,18 @@ public class CkanToZendoPublisherWidget {
|
|||
}
|
||||
|
||||
JSONValue theMessage = theErrorJSON.get("message");
|
||||
return "Error reported from Zenodo: " + theMessage.toString();
|
||||
|
||||
// //GWT.log("array: "+array.toString());
|
||||
// JSONObject theErrorValue = (JSONObject) array.get(0);
|
||||
// //GWT.log("theErrorValue: "+theErrorValue.toString());
|
||||
// JSONValue theMessage = theErrorValue.get("message");
|
||||
// //GWT.log("message: "+message.toString());
|
||||
// return "Error reported from Zenodo: " + theMessage.toString();
|
||||
String theErrors = null;
|
||||
try {
|
||||
JSONValue theError = theErrorJSON.get("errors");
|
||||
theErrors = theError.toString();
|
||||
}catch (Exception e) {
|
||||
//silent
|
||||
}
|
||||
String toReport = "Message reported from Zenodo: " + theMessage.toString();
|
||||
if(theErrors!=null)
|
||||
toReport+= " Errors: "+theErrors;
|
||||
|
||||
return toReport;
|
||||
}
|
||||
}catch (Exception e) {
|
||||
return message;
|
||||
|
|
|
@ -104,7 +104,7 @@ public class CkanToZenodoPublisherServiceImpl extends RemoteServiceServlet imple
|
|||
//Actually publish to zenodo :
|
||||
// Step 1 : metadata
|
||||
client= new Ckan2ZenodoImpl();
|
||||
LOG.debug("Calling updatedMetadta for: "+zenodoDepositionPreview);
|
||||
LOG.debug("Calling updatedMetadata for: "+zenodoDepositionPreview);
|
||||
zenodoDepositionPreview = client.updatedMetadata(zenodoDepositionPreview);
|
||||
|
||||
//Step 2 : publish Resources
|
||||
|
|
|
@ -444,6 +444,13 @@ public class ItemToZenodoConverter {
|
|||
*/
|
||||
public static DepositionMetadata updateMetadataInfoOfDepositionMetadata(ZenodoMetadata metadata, DepositionMetadata depositionMetadata) {
|
||||
|
||||
//description
|
||||
String description = metadata.getDescription();
|
||||
LOG.debug("Read description: "+description);
|
||||
if(description!=null) {
|
||||
depositionMetadata.setDescription(description);
|
||||
}
|
||||
|
||||
//upload type
|
||||
SerializableEnum<String> uploadType = metadata.getUpload_type();
|
||||
LOG.debug("Read upload type: "+uploadType);
|
||||
|
|
Loading…
Reference in New Issue