From 392b1e135cee60de0f9ab9f8fe13e3d6be48e2a0 Mon Sep 17 00:00:00 2001 From: Graham McIntie Date: Sat, 14 Feb 2026 13:44:07 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20trace=20page=20crash=20-=20detected=5Fat?= =?UTF-8?q?=20=E2=86=92=20changed=5Fat=20to=20match=20ConfigChangeEvent=20?= =?UTF-8?q?schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/towerops/trace.ex | 4 ++-- lib/towerops_web/live/trace_live/index.html.heex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/towerops/trace.ex b/lib/towerops/trace.ex index 97c0a8c9..df140eea 100644 --- a/lib/towerops/trace.ex +++ b/lib/towerops/trace.ex @@ -331,8 +331,8 @@ defmodule Towerops.Trace do ConfigChangeEvent |> where(device_id: ^device_id) - |> where([c], c.detected_at >= ^since) - |> order_by(desc: :detected_at) + |> where([c], c.changed_at >= ^since) + |> order_by(desc: :changed_at) |> limit(10) |> Repo.all() end diff --git a/lib/towerops_web/live/trace_live/index.html.heex b/lib/towerops_web/live/trace_live/index.html.heex index 2edccbb0..0b8a7499 100644 --- a/lib/towerops_web/live/trace_live/index.html.heex +++ b/lib/towerops_web/live/trace_live/index.html.heex @@ -437,7 +437,7 @@ {Map.get(change, :changed_sections, []) |> Enum.join(", ")} - {format_relative_time(change.detected_at)} + {format_relative_time(change.changed_at)}