From d785497ba5ed44e794dd67660b8779380f81ef42 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 5 Mar 2019 15:19:54 +0100 Subject: Fix suspended account's fields being set as empty dict instead of list (#10178) Fixes #10177 --- app/models/account.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/account.rb') diff --git a/app/models/account.rb b/app/models/account.rb index 87ce90178..b1abd8f0d 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -241,6 +241,7 @@ class Account < ApplicationRecord def fields_attributes=(attributes) fields = [] old_fields = self[:fields] || [] + old_fields = [] if old_fields.is_a?(Hash) if attributes.is_a?(Hash) attributes.each_value do |attr| -- cgit