mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Fix rubocop issues that are new to Ruby 2.4
This commit is contained in:
parent
82dbd3e8b8
commit
cf16aa4039
4 changed files with 12 additions and 7 deletions
|
@ -34,9 +34,13 @@ module Versions
|
|||
end
|
||||
|
||||
def user_from_id_role_username(str)
|
||||
user = ApiUser.find_by(id: $1) if str.match(/^(\d+)-(ApiUser:|api-)/)
|
||||
if str.match(/^(\d+)-(ApiUser:|api-)/)
|
||||
user = ApiUser.find_by(id: $1)
|
||||
end
|
||||
unless user.present?
|
||||
user = AdminUser.find_by(id: $1) if str.match(/^(\d+)-AdminUser:/)
|
||||
user = if str.match(/^(\d+)-AdminUser:/)
|
||||
AdminUser.find_by(id: $1)
|
||||
end
|
||||
unless user.present?
|
||||
# on import we copied Registrar name, which may eql code
|
||||
registrar = Registrar.find_by(name: str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue