From 577d05b4ee26cfb22a3649f4d9cb96cf7e1f6272 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 8 Sep 2025 09:20:40 -0500 Subject: [PATCH] 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. --- lib/aprsme/packet_consumer.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/aprsme/packet_consumer.ex b/lib/aprsme/packet_consumer.ex index e930ac4..6f65504 100644 --- a/lib/aprsme/packet_consumer.ex +++ b/lib/aprsme/packet_consumer.ex @@ -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 ->