Commit b769934b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

article year might be null

parent 7b6b4c30
......@@ -78,7 +78,11 @@ public abstract class V16_0_0_20200922_2__generic_article_data_migration extends
insert.setString(3, article.getJournal());
insert.setString(4, article.getLink());
insert.setString(5, article.getTitle());
insert.setInt(6, article.getYear());
if (article.getYear() == null) {
insert.setNull(6, Types.INTEGER);
} else {
insert.setInt(6, article.getYear());
}
if (insert.executeUpdate() == 0) {
logger.error("Problem with migrating cached article data: " + xmlArticle);
} else {
......@@ -104,7 +108,7 @@ public abstract class V16_0_0_20200922_2__generic_article_data_migration extends
}
}
} catch (Exception e) {
logger.error("Problem with migrating cached article data: " + xmlArticle);
logger.error("Problem with migrating cached article data: " + xmlArticle, e);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment