Skip to content

Commit

Permalink
ERM-3436 When exporting a KBART file, the column date_last_issue_onli…
Browse files Browse the repository at this point in the history
…ne should not contain a NULL value in case there is no end year

* make all kbartclone fields null safe
  • Loading branch information
CalamityC committed Dec 3, 2024
1 parent 156347e commit 0f758a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions service/src/main/groovy/org/olf/export/KBart.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,14 @@ public class KBart implements Serializable {
//if (coverages.size() > 1 ) log.debug(resnum + ': title: '+ ti.name +' startDate: '+ coverage.startDate +" - endDate: "+ coverage.endDate )
KBart kbartclone = new KBart();
kbartclone = kbart.clone()
kbartclone.date_first_issue_online = coverage.startDate.toString()
kbartclone.date_first_issue_online = coverage.startDate.toString() ?: ""
kbartclone.date_last_issue_online = coverage.endDate?.toString() ?: ""

kbartclone.num_first_issue_online = coverage.startIssue
kbartclone.num_last_issue_online = coverage.endIssue
kbartclone.num_first_issue_online = coverage.startIssue ?: ""
kbartclone.num_last_issue_online = coverage.endIssue ?: ""

kbartclone.num_first_vol_online = coverage.startVolume
kbartclone.num_last_vol_online = coverage.endVolume
kbartclone.num_first_vol_online = coverage.startVolume ?: ""
kbartclone.num_last_vol_online = coverage.endVolume ?: ""
kbartList.add(kbartclone)
}
} else {
Expand Down

0 comments on commit 0f758a1

Please sign in to comment.