added LIMIT 1 when retrieving piwik site to avoid problems with existing duplicates in db

This commit is contained in:
Konstantinos Spyrou 2023-01-17 17:56:18 +02:00
parent 49cc3d74e8
commit 40b20b1122
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public class PiWikServiceImpl implements PiWikService {
private EmailUtils emailUtils;
private static final String GET_PIWIK_SITE = "select repositoryid, siteid, authenticationtoken, creationdate, requestorname, requestoremail, validated, validationdate, comment, repositoryname, country from piwik_site where repositoryid = ?;";
private static final String GET_PIWIK_SITE = "select repositoryid, siteid, authenticationtoken, creationdate, requestorname, requestoremail, validated, validationdate, comment, repositoryname, country from piwik_site where repositoryid = ? LIMIT 1;";
private static final String INSERT_PIWIK_INFO = "insert into piwik_site (repositoryid, siteid, creationdate, requestorname, requestoremail, validated, repositoryname, country, authenticationtoken) values (?, ?, now(), ?, ?, ?, ?, ?, ?)";