check if grant exists in word/pdf export
This commit is contained in:
parent
56a70636c3
commit
34580f917f
|
@ -1092,7 +1092,7 @@ public class WordBuilder {
|
|||
XWPFTable tbl = document.getTables().get(0);
|
||||
Iterator<XWPFTableRow> it = tbl.getRows().iterator();
|
||||
it.next(); // skip first row
|
||||
if(it.hasNext()){
|
||||
if(it.hasNext() && dmpEntity.getGrant() != null){
|
||||
XWPFParagraph p = it.next().getCell(0).getParagraphs().get(0);
|
||||
XWPFRun run = p.createRun();
|
||||
run.setText(dmpEntity.getGrant().getFunder().getLabel());
|
||||
|
@ -1101,7 +1101,7 @@ public class WordBuilder {
|
|||
}
|
||||
it = tbl.getRows().iterator();
|
||||
it.next();
|
||||
if(it.hasNext()){
|
||||
if(it.hasNext() && dmpEntity.getGrant() != null){
|
||||
XWPFParagraph p = it.next().getCell(1).getParagraphs().get(0);
|
||||
XWPFRun run = p.createRun();
|
||||
String text = dmpEntity.getGrant().getLabel();
|
||||
|
|
Loading…
Reference in New Issue