From 0c9a5d3be15d8f0cfa0fcddcefcbb65ec5a8eadd Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 15 May 2024 01:53:06 +0200 Subject: Frontend.Tickets: fix "last call" in ticket view (same as previous commit, this displayed the wrong ping) --- lib/Server/Frontend/Tickets.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Server/Frontend/Tickets.hs b/lib/Server/Frontend/Tickets.hs index 3e17cd1..839aeba 100644 --- a/lib/Server/Frontend/Tickets.hs +++ b/lib/Server/Frontend/Tickets.hs @@ -195,7 +195,7 @@ getTicketViewR ticketId = do trackers <- runDB $ selectList ([ TrackerId <-. joins ] ||. [ TrackerCurrentTicket ==. Just ticketKey ]) [Asc TrackerExpires] - lastPing <- runDB $ selectFirst [ TrainPingToken <-. fmap entityKey trackers ] [Desc TrainPingTimestamp] + lastPing <- runDB $ selectFirst [ TrainPingTicket ==. coerce ticketId ] [Desc TrainPingTimestamp] anchors <- runDB $ selectList [ TrainAnchorTicket ==. ticketKey ] [] <&> nonEmpty . fmap entityVal -- cgit v1.2.3