Skip to content

Commit

Permalink
[ajey] return the right key
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeygore committed Oct 1, 2018
1 parent c0d614c commit 72d1c3b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/nss_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def add_host
host = HostMachine.find_or_create_by(name: params[:name])
host.add_host_group(params[:name])
host.add_group(params[:group_name])
host.reload
render 'add_host', locals: { host: host }, format: :json
else
errors = ['Name can\'t be blank']
Expand Down
1 change: 0 additions & 1 deletion app/models/host_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class HostMachine < ActiveRecord::Base

before_create :set_lower_case_name
before_save :set_host_access_key
before_create :set_host_access_key

def set_host_access_key
self.access_key = ROTP::Base32.random_base32
Expand Down

0 comments on commit 72d1c3b

Please sign in to comment.