#794: fix undefined method 'public' for nil:NilClass
This commit is contained in:
parent
7f14958a89
commit
a558ec622f
|
@ -1,6 +1,11 @@
|
|||
json.repository do |json|
|
||||
json.partial! 'repository', :repository => @repository, :json => json
|
||||
json.key_pair do |json_key_pair|
|
||||
json_key_pair.(@repository.key_pair, :public, :secret)
|
||||
if @repository.key_pair
|
||||
json_key_pair.(@repository.key_pair, :public, :secret)
|
||||
else
|
||||
json_key_pair.public ''
|
||||
json_key_pair.secret ''
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue