fix(postgres): fix creating issue
Signed-off-by: soxx <soxx@fenpa.ws>
This commit is contained in:
parent
f5360d2757
commit
aea99da484
@ -70,7 +70,7 @@ func CreateUserNodeWithSourceRelation(ctx context.Context, db *gorm.DB, anthrove
|
|||||||
AccountID: userID,
|
AccountID: userID,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := db.WithContext(ctx).Create(&userSource).Error; err != nil {
|
if err := db.WithContext(ctx).FirstOrCreate(&userSource).Error; err != nil {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"anthrove_user_id": anthroveUserID,
|
"anthrove_user_id": anthroveUserID,
|
||||||
"source_domain": sourceDomain,
|
"source_domain": sourceDomain,
|
||||||
|
Reference in New Issue
Block a user