Skip to content

Commit 8d3f6c0

Browse files
minor invite fixes
1 parent 3a6e50e commit 8d3f6c0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/core/lib/core/pubsub/protocols/cacheable.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ defimpl Core.PubSub.Cacheable, for: Core.PubSub.ClusterDependencyCreated do
3838
end
3939
end
4040

41-
defimpl Core.PubSub.Cacheable, for: Core.PubSub.UserDeleted do
41+
42+
defimpl Core.PubSub.Cacheable, for: [Core.PubSub.UserDeleted, Core.PubSub.UserCreated] do
4243
def cache(%{item: %{id: user_id}}), do: {:del, {:login, user_id}, nil}
4344
end
4445

apps/core/lib/core/schema/invite.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ defmodule Core.Schema.Invite do
4040
|> foreign_key_constraint(:oidc_provider_id)
4141
|> foreign_key_constraint(:service_account_id)
4242
|> unique_constraint(:secure_id)
43-
|> unique_constraint(:email)
43+
|> unique_constraint(:email, message: "the user with this email has already been invited")
4444
|> validate_format(:email, @email_re)
4545
|> validate_required([:email, :account_id, :secure_id])
4646
end

0 commit comments

Comments
 (0)