Skip to content

Commit d514338

Browse files
committed
handle missing handle case in seeder
1 parent 10ec6cd commit d514338

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/algora/organizations/organizations.ex

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,15 @@ defmodule Algora.Organizations do
175175
|> Repo.insert()
176176

177177
existing_org ->
178+
params =
179+
if existing_org.handle do
180+
Map.delete(params, :handle)
181+
else
182+
params
183+
end
184+
178185
existing_org
179-
|> Org.changeset(Map.delete(params, :handle))
186+
|> Org.changeset(params)
180187
|> Repo.update()
181188
end
182189

0 commit comments

Comments
 (0)