Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: nil check in logging conditional #1860

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ defmodule Screens.V2.CandidateGenerator.Widgets.TrainCrowding do
params |> Map.to_list() |> fetch_alerts_fn.() do
next_train_prediction = List.first(predictions)

if logging_options.is_real_screen do
if next_train_prediction && logging_options && logging_options.is_real_screen do
Logger.info(
"[train_crowding next_prediction] screen_id=#{logging_options.screen_id} triptych_pane=#{logging_options.triptych_pane} next_trip_id=#{next_train_prediction.trip.id}"
)
Expand Down
Loading