Skip to content

Commit aac6496

Browse files
committed
Gateway idを取得する処理がなにか間違っていたので修正
1 parent ab0a9b1 commit aac6496

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ def device(posted_hash)
846846
end
847847

848848
if Gateway.exists?(hardware_uid: posted_hash[:gateway_uid])
849-
gateway_id = Gateway.where(hardware_uid: posted_hash[:gateway_uid])[0]
849+
gateway_id = Gateway.where(hardware_uid: posted_hash[:gateway_uid])[0].id
850850
posted_hash.delete(:gateway_uid)
851851
else
852852
halt 400, TEXT_PLAIN, "Posted gateway not found."

0 commit comments

Comments
 (0)