Skip to content

Commit 60c06de

Browse files
authored
Merge pull request #676 from code-corps/fix-user-migration
Fix user migration
2 parents 1bc61bb + b1c3a76 commit 60c06de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

priv/repo/image_migration.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ defmodule CodeCorps.Repo.Seeds.ImageMigration do
8282
IO.puts "No photo exists for #{user.username}, generating color only."
8383
color = @icon_color_generator.generate
8484
{:ok, user} =
85-
User.changeset(user, %{default_color: color})
85+
User.update_changeset(user, %{default_color: color})
8686
|> Repo.update
8787
true ->
8888
IO.puts "Migrating image from S3 to Cloudinary for #{user.username}."
@@ -96,7 +96,7 @@ defmodule CodeCorps.Repo.Seeds.ImageMigration do
9696
|> Cloudex.upload()
9797

9898
{:ok, user} =
99-
User.changeset(user, %{cloudinary_public_id: public_id, default_color: color})
99+
User.update_changeset(user, %{cloudinary_public_id: public_id, default_color: color})
100100
|> Repo.update
101101
end
102102
end

0 commit comments

Comments
 (0)