From 170fec60a3e7af5459bdb60c41155c1624d7d6d3 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Sun, 15 Dec 2024 08:39:44 +0000 Subject: [PATCH] Repo.insert(on_conflict: :replace_all, conflict_target: [:id]) --- lib/app/user.ex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/app/user.ex b/lib/app/user.ex index a7c7d6d..57df4ee 100644 --- a/lib/app/user.ex +++ b/lib/app/user.ex @@ -37,13 +37,12 @@ defmodule App.User do def create(attrs) do %User{} |> changeset(attrs) - |> Repo.insert() + |> Repo.insert(on_conflict: :replace_all, conflict_target: [:id]) end # Envar.require_env_file(".env") def get_org_members_from_api(org_name) do - # dbg(org_name) token = Envar.get("GH_PERSONAL_ACCESS_TOKEN") client = Tentacat.Client.new(%{access_token: token})