Make the info panel show the correct last alerting

Before, it was checking against the moved pointer, which could cause inaccurate
This commit is contained in:
2024-12-03 04:27:35 -08:00
parent ac5d794df1
commit 50f65abced
2 changed files with 8 additions and 2 deletions

View File

@@ -289,8 +289,8 @@ class Tracker(Extension):
history = await self._history_manager.get_history(alert.flavor, alert.region)
trigger = await history.find_update_trigger_from_alert(alert)
if trigger.last_trigger is not None:
alert_str = (f"Last Alerting Price Value: {format(trigger.last_trigger[1], ",")}\n"
f"Last Alerting Time: {trigger.last_trigger[0].strftime('%Y-%m-%d %H:%M:%S UTC')}\n")
alert_str = (f"Last Alerting Price Value: {format(trigger.last_alerting()[1], ",")}\n"
f"Last Alerting Time: {trigger.last_alerting()[0].strftime('%Y-%m-%d %H:%M:%S UTC')}\n")
else:
alert_str = "You should only be seeing this if the bot has not finished importing history at startup."
fields.append(