From 33a855fbe7b15eff11b4634c016c33baf13b8271 Mon Sep 17 00:00:00 2001 From: dinsmol Date: Thu, 8 Jul 2021 17:56:42 +0300 Subject: [PATCH] codeclimate fixes --- app/models/epp/contact.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/epp/contact.rb b/app/models/epp/contact.rb index 57c4d033a..6f53eaed5 100644 --- a/app/models/epp/contact.rb +++ b/app/models/epp/contact.rb @@ -24,11 +24,9 @@ class Epp::Contact < Contact def validate_birthday_ident return unless Depp::Contact::SELECTION_TYPES[2].include?(ident_type) - if begin + begin Date.parse(ident) - rescue StandardError - ArgumentError - end == ArgumentError + rescue ArgumentError add_epp_error('2308', nil, nil, I18n.t('epp.contacts.errors.valid_ident_date_format')) @error = true return