Only update forum posts if post id was found
This commit is contained in:
@@ -27,9 +27,11 @@ public class MatchesListForumUpdater {
|
||||
MatchesListCreator creator = new MatchesListCreator(league);
|
||||
String content = creator.getMatchesBeautiful();
|
||||
String contentWithCodeBBCode = "<r><CODE><s>[code]</s>" + content + "<e>[/code]</e></CODE></r>";
|
||||
int postId = getPostId(creator.getCountry(), creator.getLeagueName());
|
||||
TippligaSQLConnector con = TippligaSQLConnector.getInstance();
|
||||
con.updatePost(postId, contentWithCodeBBCode);
|
||||
Integer postId = getPostId(creator.getCountry(), creator.getLeagueName());
|
||||
if(postId != null) {
|
||||
TippligaSQLConnector con = TippligaSQLConnector.getInstance();
|
||||
con.updatePost(postId, contentWithCodeBBCode);
|
||||
}
|
||||
}
|
||||
|
||||
private Integer getPostId(String country, String league) {
|
||||
|
||||
Reference in New Issue
Block a user