diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index f08b71123..8729cead2 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -640,6 +640,7 @@ func checkBucketLimit(s *xorm.Session, t *Task, bucket *Bucket) (err error) { if bucket.Limit > 0 { taskCount, err := s. Where("bucket_id = ?", bucket.ID). + GroupBy("task_id"). Count(&TaskBucket{}) if err != nil { return err