diff --git a/lib/logflare/source/bigquery/schema.ex b/lib/logflare/source/bigquery/schema.ex index d2029599c..5bfe05985 100644 --- a/lib/logflare/source/bigquery/schema.ex +++ b/lib/logflare/source/bigquery/schema.ex @@ -314,7 +314,7 @@ defmodule Logflare.Source.BigQuery.Schema do end defp notify_maybe(source_token, new_schema, old_schema) do - %Source{user: user} = source = Sources.Cache.get_by_and_preload(token: source_token) + %Source{user: user} = source = Sources.get_by_and_preload(token: source_token) if source.notifications.user_schema_update_notifications do AccountEmail.schema_updated(user, source, new_schema, old_schema) diff --git a/test/logflare/source/bigquery/schema_test.exs b/test/logflare/source/bigquery/schema_test.exs index c040d6b7e..7357c02db 100644 --- a/test/logflare/source/bigquery/schema_test.exs +++ b/test/logflare/source/bigquery/schema_test.exs @@ -48,7 +48,7 @@ defmodule Logflare.Source.BigQuery.SchemaTest do Logflare.Mailer |> expect(:deliver, 1, fn _ -> :ok end) - Logflare.Sources.Cache + Logflare.Sources |> expect(:get_by_and_preload, fn _ -> source end) |> expect(:get_by, fn _ -> source end)