1 parent ab0a9b1 commit aac6496Copy full SHA for aac6496
1 file changed
main.rb
@@ -846,7 +846,7 @@ def device(posted_hash)
846
end
847
848
if Gateway.exists?(hardware_uid: posted_hash[:gateway_uid])
849
- gateway_id = Gateway.where(hardware_uid: posted_hash[:gateway_uid])[0]
+ gateway_id = Gateway.where(hardware_uid: posted_hash[:gateway_uid])[0].id
850
posted_hash.delete(:gateway_uid)
851
else
852
halt 400, TEXT_PLAIN, "Posted gateway not found."
0 commit comments