mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Repp: Contact create: validate identifier
This commit is contained in:
parent
d4628d52ba
commit
01004b8ed4
5 changed files with 67 additions and 19 deletions
|
@ -30,12 +30,13 @@ class Epp::Contact < Contact
|
|||
at
|
||||
end
|
||||
|
||||
def new(frame, registrar)
|
||||
def new(frame, registrar, epp: true)
|
||||
return super if frame.blank?
|
||||
|
||||
attrs = epp ? attrs_from(frame, new_record: true) : frame
|
||||
super(
|
||||
attrs_from(frame, new_record: true).merge(
|
||||
code: frame.css('id').text,
|
||||
attrs.merge(
|
||||
code: epp ? frame.css('id').text : frame[:id],
|
||||
registrar: registrar
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue