Skip to content

Commit

Permalink
'#43 corrects loop on data fields
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdalla committed Oct 9, 2023
1 parent 1f650aa commit b2ff524
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ public void write_artifact_data_table(Object headers, Object data_list, String f
for (String property : (Collection<String>) headers) {
if (data[i] != null) {
addMetadata(m, property, data[i].toString());

i++;
}
i++;
}
}
subItem.setExtraAttribute(IndexItem.PARENT_TRACK_ID, parentInfo.getTrackId());
Expand All @@ -140,7 +139,7 @@ public void write_artifact_data_table(Object headers, Object data_list, String f
* Properly maps, format and add leap html columns as IPED item metadata
*/
private void addMetadata(Metadata m, String property, String value) throws IOException {
if (value.trim().equals("")) {
if (value == null || value.trim().equals("")) {
return;
}
if (property.contains("Latitude")) {
Expand Down Expand Up @@ -168,7 +167,7 @@ private void addMetadata(Metadata m, String property, String value) throws IOExc
location = null;
}
}
m.add("aleap:" + property, value);
m.add("aleapp:" + property, value);

// some plugins have the linked item per artifact record
if (value.startsWith(reportDumpPath.getCanonicalPath())) {
Expand Down

0 comments on commit b2ff524

Please sign in to comment.