You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have discovered the following issue while testing EPP update: I manually created new contact with the code "test". Then I tried to update it via EPP by specifying "test" as a content of "id" tag, but it failed, since the code is saved to the database as is if created outside of EPP, but is converted to uppercase when making EPP query.
I consider this kind of behaviour harmful and suggest that we either remove auto uppercase in EPP at all or make it predictable by adding auto conversion to Contact model, so it is always saved upper-cased.
The text was updated successfully, but these errors were encountered:
artur-intech
changed the title
Unexpected behaviour
Unexpected behaviour of contact code
Mar 9, 2017
I have discovered the following issue while testing EPP update: I manually created new contact with the code "test". Then I tried to update it via EPP by specifying "test" as a content of "id" tag, but it failed, since the code is saved to the database as is if created outside of EPP, but is converted to uppercase when making EPP query.
Last thing leads to additional effort finding out why newly added contact is not found. It is also unnatural to always specify the code in uppercase. Consider this example https://github.com/internetee/registry/blob/master/spec/requests/epp/contact/update/phone_spec.rb: it opens up a question: why TEST is just upper-cased?!
Querying a contact via EPP fails if a contact is created using one of the following statements:
Contact.create!(name: 'test', code: 'test1', phone: '+123.4', email: 'test111@internet.ee', country_code: 'EE', ident: '37605030299', ident_type: 'priv', ident_country_code: 'EE', registrar: Registrar.last)
I consider this kind of behaviour harmful and suggest that we either remove auto uppercase in EPP at all or make it predictable by adding auto conversion to Contact model, so it is always saved upper-cased.
The text was updated successfully, but these errors were encountered: