r3472 - trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl
Author: tchemit Date: 2012-06-13 18:58:52 +0200 (Wed, 13 Jun 2012) New Revision: 3472 Url: http://chorem.org/repositories/revision/pollen/3472 Log: fixes #601: Account token is missing on link in email for restrictive poll Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java =================================================================== --- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-06-13 16:58:24 UTC (rev 3471) +++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-06-13 16:58:52 UTC (rev 3472) @@ -1017,15 +1017,16 @@ // // FIXME-fdesbois-2012-04-12 : find a better way to ensure accountId String accountId = pollAccount.getAccountId(); - pollAccountLoaded = pollAccountDAO.findByAccountId(accountId); - if (pollAccountLoaded == null) { + if (StringUtils.isBlank(accountId)) { // creates a new pollAccount - pollAccountLoaded = createWithProperties( pollAccountDAO, PollAccount.PROPERTY_ACCOUNT_ID, generateId()); - pollAccountLoaded.setAccountId(accountId); + } else { + + // reuse the existing account + pollAccountLoaded = pollAccountDAO.findByAccountId(accountId); } } else {
participants (1)
-
tchemit@users.chorem.org