diff options
Diffstat (limited to 'src/com/p4square/grow/frontend')
-rw-r--r-- | src/com/p4square/grow/frontend/SurveyPageResource.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/p4square/grow/frontend/SurveyPageResource.java b/src/com/p4square/grow/frontend/SurveyPageResource.java index 4bb132a..3575fe3 100644 --- a/src/com/p4square/grow/frontend/SurveyPageResource.java +++ b/src/com/p4square/grow/frontend/SurveyPageResource.java @@ -249,9 +249,12 @@ public class SurveyPageResource extends FreeMarkerPageResource { if (nextQuestionId == null) { // Just finished the last question. Update the user's account try { - UserRecord account = mUserRecordProvider.get(mUserId); - if (account == null) { - account = new UserRecord(); + UserRecord account = null; + try { + account = mUserRecordProvider.get(mUserId); + } catch (NotFoundException e) { + // User record doesn't exist, so create a new one. + account = new UserRecord(getRequest().getClientInfo().getUser()); } account.setLanding("training"); mUserRecordProvider.put(mUserId, account); |