mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Test changing publishable field on registrant API
This commit is contained in:
parent
5c129b24ef
commit
4286a6bab7
3 changed files with 17 additions and 2 deletions
|
@ -72,7 +72,7 @@ module Api
|
|||
contact.disclosed_attributes = disclosed_attributes
|
||||
end
|
||||
|
||||
contact.publishable = reparsed_request_json[:publishable] if reparsed_request_json[:publishable]
|
||||
contact.publishable = reparsed_request_json[:publishable] if reparsed_request_json[:publishable].present?
|
||||
|
||||
logger.debug "Setting.address_processing is set to #{Setting.address_processing}"
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ class Contact < ApplicationRecord
|
|||
|
||||
validate :validate_html
|
||||
validate :validate_country_code, if: -> { self.class.address_processing? }
|
||||
validates_inclusion_of :publishable, in: [false], unless: -> { registrant? }
|
||||
validates :publishable, inclusion: { in: [true, false] }
|
||||
|
||||
after_initialize do
|
||||
self.status_notes = {} if status_notes.nil?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue