From 84fdc655ad93305b273c3434e5041aff268fd897 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 24 Aug 2015 10:28:38 +1000 Subject: [PATCH] correct retry logic --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 650d2b9ee1e..0edd01a97a1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -395,7 +395,7 @@ class User < ActiveRecord::Base create_visit_record!(now.to_date, posts_read: num_posts, mobile: opts.fetch(:mobile, false)) rescue ActiveRecord::RecordNotUnique if !_retry - update_posts_read!(num_posts, now, _retry=true) + update_posts_read!(num_posts, opts.merge( retry: true )) else raise end