From c314a1862f7998ade43db2c02545465b663cb8a2 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 16 Aug 2013 17:04:30 +1000 Subject: [PATCH] add todo --- app/models/user_action.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/user_action.rb b/app/models/user_action.rb index ff229ae59c7..e3939afe369 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -172,6 +172,8 @@ ORDER BY p.created_at desc transaction(requires_new: true) do begin + # TODO there are conditions when this is called and user_id was already rolled back and is invalid. + # protect against dupes, for some reason this is failing in some cases action = self.where(hash.select{|k,v| required_parameters.include?(k)}).first return action if action