Don't attempt to call summary on profile during onboarding (#11836)
This commit is contained in:
parent
e28b75b19a
commit
f2722f8701
1 changed files with 3 additions and 0 deletions
|
|
@ -32,6 +32,9 @@ class ProfileValidator < ActiveModel::Validator
|
|||
private
|
||||
|
||||
def summary_too_long?(record)
|
||||
# During onboarding, the attribute is not yet available
|
||||
return unless record.respond_to?(SUMMARY_ATTRIBUTE)
|
||||
|
||||
return unless ProfileField.exists?(attribute_name: SUMMARY_ATTRIBUTE)
|
||||
return if record.summary.blank?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue