guardar cambios antes de crear llaves
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2022-03-21 13:21:29 -03:00
parent 97b455d413
commit 9eab5ca0f6

View file

@ -54,8 +54,8 @@ class ReadingsController < ActionController::API
r.tap do |r| r.tap do |r|
r.name = params[:controller_id] r.name = params[:controller_id]
r.serial_number = params[:serial_number] r.serial_number = params[:serial_number]
r.public_keys.find_or_create_by(content: params[:public_key])
r.save r.save
r.public_keys.find_or_create_by(content: params[:public_key])
end end
end end
end end