cmd/ismdb: less noisy
This commit is contained in:
+2
-2
@@ -66,8 +66,8 @@ func insert(ctx context.Context, db *sqlitemigration.Pool, log *slog.Logger, car
|
||||
// if there's something wrong with the db.
|
||||
if err := insertCareer(conn, log, career, trainerID); err != nil {
|
||||
code := sqlite.ErrCode(err)
|
||||
if code == sqlite.ResultConstraintUnique {
|
||||
log.InfoContext(ctx, "already loaded")
|
||||
if code == sqlite.ResultConstraintPrimaryKey {
|
||||
log.DebugContext(ctx, "already loaded")
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user