Skip to content

Commit

Permalink
Merge pull request #3143 from keeps/alindo-dev-fixdelete
Browse files Browse the repository at this point in the history
Checking if doc has pluginState field before setting it
  • Loading branch information
hmiguim authored May 2, 2024
2 parents 85e66d0 + bf2df0a commit fa29b5e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ public IndexedReport fromSolrDocument(SolrDocument doc, List<String> fieldsToRet
jobReport.setPlugin(SolrUtils.objectToString(doc.get(RodaConstants.JOB_REPORT_PLUGIN), null));
jobReport.setPluginName(SolrUtils.objectToString(doc.get(RodaConstants.JOB_REPORT_PLUGIN_NAME), null));
jobReport.setPluginVersion(SolrUtils.objectToString(doc.get(RodaConstants.JOB_REPORT_PLUGIN_VERSION), null));
jobReport.setPluginState(
PluginState.valueOf(SolrUtils.objectToString(doc.get(RodaConstants.JOB_REPORT_PLUGIN_STATE), null)));
if (doc.containsKey(RodaConstants.JOB_REPORT_PLUGIN_STATE)) {
jobReport.setPluginState(
PluginState.valueOf(SolrUtils.objectToString(doc.get(RodaConstants.JOB_REPORT_PLUGIN_STATE), null)));
}
jobReport
.setPluginIsMandatory(SolrUtils.objectToBoolean(doc.get(RodaConstants.JOB_REPORT_PLUGIN_IS_MANDATORY), null));
jobReport.setPluginDetails(SolrUtils.objectToString(doc.get(RodaConstants.JOB_REPORT_PLUGIN_DETAILS), null));
Expand Down

0 comments on commit fa29b5e

Please sign in to comment.