about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-08-11 17:25:06 +0200
committerGitHub <noreply@github.com>2021-08-11 17:25:06 +0200
commit4a364de500029676b9828ec596ed6c2a09cfb65c (patch)
treedeb1c1549b7ad575074e5913aaad55d8a85d2ddf /app
parent70b7ac9ff32a713e71a7ba6408a379b601c6839f (diff)
parent47ea9b2d677b380e09d79958ae1c988f031cdf75 (diff)
Merge pull request #1585 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app')
-rw-r--r--app/models/account.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 3178a0f9c..ab3cac0d6 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -299,7 +299,11 @@ class Account < ApplicationRecord
   end
 
   def fields
-    (self[:fields] || []).map { |f| Field.new(self, f) }
+    (self[:fields] || []).map do |f|
+      Field.new(self, f)
+    rescue
+      nil
+    end.compact
   end
 
   def fields_attributes=(attributes)