fixed legal attributes

This commit is contained in:
olegphenomenon 2022-11-28 11:43:00 +02:00
parent ea2fc01a60
commit 86fad85d03
3 changed files with 29 additions and 22 deletions

View file

@ -55,7 +55,10 @@ module Api
attributes_not_exist_error(extra_attrs) and return if extra_attrs.present?
end
# render_disclosed_attributes_error and return if disclosed_attributes.present? && contact.org?
if disclosed_attributes.present? && contact.org?
extra_attrs = disclosed_attributes - Contact::OPEN_LEGAL_ATTRIBUTES
render_disclosed_attributes_error and return if extra_attrs.present?
end
contact.disclosed_attributes = disclosed_attributes if disclosed_attributes
publishable = reparsed_request[:registrant_publishable]