mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
Allow update phone disclose situation with org registrations
This commit is contained in:
parent
5c70e9f38b
commit
9623b3e207
2 changed files with 15 additions and 1 deletions
|
@ -62,7 +62,7 @@ module Api
|
|||
disclosed_attributes = reparsed_request_json[:disclosed_attributes]
|
||||
|
||||
if disclosed_attributes
|
||||
if disclosed_attributes.present? && contact.org?
|
||||
if disclosed_attributes.present? && contact.org? && !disclosed_attributes.include?('phone')
|
||||
error_msg = "Legal person's data is visible by default and cannot be concealed." \
|
||||
' Please remove this parameter.'
|
||||
render json: { errors: [{ disclosed_attributes: [error_msg] }] }, status: :bad_request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue