diff --git a/app/models/person.rb b/app/models/person.rb index 8745a1179..64746200e 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -185,6 +185,8 @@ class Person < ApplicationRecord # end # will not work! The nil profile will be overriden with an empty one. def initialize(params={}) + params = {} if params.nil? + profile_set = params.has_key?(:profile) || params.has_key?("profile") params[:profile_attributes] = params.delete(:profile) if params.has_key?(:profile) && params[:profile].is_a?(Hash) super