diff options
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 30df55b96..f869f648b 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -112,11 +112,8 @@ class Query < ActiveRecord::Base def initialize(attributes = nil) super attributes self.filters ||= { 'status_id' => {:operator => "o", :values => [""]} } - end - - def executed_by=(user) - @executed_by = user - set_language_if_valid(user.language) if user + @executed_by = User.current.logged? ? User.current : nil + set_language_if_valid(executed_by.language) if executed_by end def validate |