ruuvi / ruuvitracker_server

RuuviTracker Server
https://ruuvi.com
BSD 2-Clause "Simplified" License
22 stars 7 forks source link

Numeric parameters are not correctly parsed when storing data with Tracker API #32

Closed jsyrjala closed 12 years ago

jsyrjala commented 12 years ago
Failure to execute query with SQL:
INSERT INTO "event_locations" ("event_id", "latitude", "longitude", "accuracy", "satellite_count", "altitude") VALUES (?, ?, ?, ?, NULL, ?)  ::  [21543 49.274333M -123.185333M 471.96052108668414 26.507844924926758]
PSQLException:
 Message: ERROR: column "altitude" is of type numeric but expression is of type character varying
  Hint: You will need to rewrite or cast the expression.
  Position: 142
 SQLState: 42804
 Error Code: 0
23:56:55.345 ERROR ruuvi-server.tracker-api: Error #<PSQLException org.postgresql.util.PSQLException: ERROR: column "altitude" is of type numeric but expression is of type character varying
  Hint: You will need to rewrite or cast the expression.
  Position: 142>