diff --git a/app/models/account.rb b/app/models/account.rb index 5d6324a7b55..621a66e24b8 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -125,13 +125,9 @@ class Account < ApplicationRecord def save_with_optional_avatar! save! - rescue ActiveRecord::RecordInvalid => invalid - if invalid.record.errors[:avatar_file_size] || invalid.record.errors[:avatar_content_type] - self.avatar = nil - retry - end - - raise invalid + rescue ActiveRecord::RecordInvalid + self.avatar = nil + save! end def avatar_remote_url=(url)