diff options
Diffstat (limited to 'lib/redmine/safe_attributes.rb')
-rw-r--r-- | lib/redmine/safe_attributes.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/redmine/safe_attributes.rb b/lib/redmine/safe_attributes.rb index 0bde0f970..a2711cc4b 100644 --- a/lib/redmine/safe_attributes.rb +++ b/lib/redmine/safe_attributes.rb @@ -80,6 +80,10 @@ module Redmine # Sets attributes from attrs that are safe # attrs is a Hash with string keys def safe_attributes=(attrs, user=User.current) + if attrs.respond_to?(:to_unsafe_hash) + attrs = attrs.to_unsafe_hash + end + return unless attrs.is_a?(Hash) self.attributes = delete_unsafe_attributes(attrs, user) end |