Skip to content

Commit

Permalink
Merge pull request #1706 from Logflare/fix/nil-email-schema-alert
Browse files Browse the repository at this point in the history
fix: nil email for team_user
  • Loading branch information
Ziinc authored Dec 12, 2023
2 parents 9a50c18 + 8d1f4e0 commit 1f58788
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/logflare/source/bigquery/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/logflare/source/bigquery/schema_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1f58788

Please sign in to comment.