Skip to content

Commit

Permalink
Protected against org title being nil (#1536)
Browse files Browse the repository at this point in the history
* Protected against org title being nil
  • Loading branch information
RyanRConaway authored Nov 16, 2022
1 parent 501232b commit 388a86f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/andi/lib/andi/input_schemas/organizations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ defmodule Andi.InputSchemas.Organizations do
end
end

def is_unique?(id, nil) do
false
end

def is_unique?(id, org_name) do
from(org in Andi.InputSchemas.Organization,
where: org.orgName == ^org_name and org.id != ^id
Expand Down

0 comments on commit 388a86f

Please sign in to comment.