Fix posresolution type error by converting integers to floats
Add posresolution and rain_midnight to the list of float fields in normalize_numeric_types to ensure integer values are converted to floats before database insertion. This fixes the Ecto.ChangeError that was preventing many APRS packets from being stored in the database.
This commit is contained in:
parent
130f9a39d2
commit
577d05b4ee
1 changed files with 3 additions and 1 deletions
|
|
@ -656,7 +656,9 @@ defmodule Aprsme.PacketConsumer do
|
|||
:rain_since_midnight,
|
||||
:snow,
|
||||
:speed,
|
||||
:altitude
|
||||
:altitude,
|
||||
:posresolution,
|
||||
:rain_midnight
|
||||
]
|
||||
|
||||
Enum.reduce(float_fields, attrs, fn field, acc ->
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue