|
|
@ -208,7 +208,7 @@ func (l *Loader) FindProject(ctx context.Context, id string) (*models.ProjectRes |
|
|
|
|
|
|
|
logs, err := l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
IDs: taskIDs, |
|
|
|
TaskIDs: taskIDs, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -271,7 +271,7 @@ func (l *Loader) ListProjects(ctx context.Context, filter models.ProjectFilter) |
|
|
|
|
|
|
|
logs, err := l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
IDs: taskIDs, |
|
|
|
TaskIDs: taskIDs, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -332,7 +332,7 @@ func (l *Loader) FindTask(ctx context.Context, id string) (*models.TaskResult, e |
|
|
|
result.Project, _ = l.DB.Projects().Find(ctx, task.ProjectID) |
|
|
|
result.Logs, err = l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: task.UserID, |
|
|
|
IDs: []string{task.ID}, |
|
|
|
TaskIDs: []string{task.ID}, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -364,7 +364,7 @@ func (l *Loader) ListTasks(ctx context.Context, filter models.TaskFilter) ([]*mo |
|
|
|
|
|
|
|
logs, err := l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
IDs: taskIDs, |
|
|
|
TaskIDs: taskIDs, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -394,7 +394,7 @@ func (l *Loader) ListTasks(ctx context.Context, filter models.TaskFilter) ([]*mo |
|
|
|
} |
|
|
|
|
|
|
|
for _, log := range logs { |
|
|
|
if log.TaskID != task.ID { |
|
|
|
if log.TaskID == task.ID { |
|
|
|
result.Logs = append(result.Logs, log) |
|
|
|
} |
|
|
|
} |
|
|
|