develop/batch-jobs #13

Merged
fenpaws merged 11 commits from develop/batch-jobs into main 2024-07-06 21:49:26 +00:00
Showing only changes of commit 83fdd336a3 - Show all commits

View File

@ -188,7 +188,10 @@ func CreateTagAlias(ctx context.Context, db *gorm.DB, tagAliasName models.Anthro
return &otterError.EntityValidationFailed{Reason: otterError.AnthroveTagIDEmpty}
}
result := db.WithContext(ctx).Create(&models.TagAlias{
result := db.WithContext(ctx).Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "name"}},
DoNothing: true,
}).Create(&models.TagAlias{
Name: string(tagAliasName),
TagID: string(tagID),
})