修bug
This commit is contained in:
@@ -154,8 +154,8 @@ func (r *gormPendingTaskRepository) ClaimNextAvailableTask(ctx context.Context,
|
||||
return err
|
||||
}
|
||||
|
||||
// 在 Preload("Tasks") 时,使用 Unscoped() 来忽略 Task 的软删除状态
|
||||
if err := tx.WithContext(repoCtx).Preload("Tasks", func(db *gorm.DB) *gorm.DB {
|
||||
// 在 Preload("Task") 时,使用 Unscoped() 来忽略 Task 的软删除状态
|
||||
if err := tx.WithContext(repoCtx).Preload("Task", func(db *gorm.DB) *gorm.DB {
|
||||
return db.Unscoped()
|
||||
}).First(&log, pendingTask.TaskExecutionLogID).Error; err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user