Cleanup
This commit is contained in:
parent
bc21a21622
commit
cd5599a10d
|
@ -707,7 +707,7 @@ func addMoreInfoToTasks(s *xorm.Session, taskMap map[int64]*Task) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func checkBucketAndTaskBelongToSameList(s *xorm.Session, fullTask *Task, bucket *Bucket) (err error) {
|
||||
func checkBucketAndTaskBelongToSameList(fullTask *Task, bucket *Bucket) (err error) {
|
||||
if fullTask.ListID != bucket.ListID {
|
||||
return ErrBucketDoesNotBelongToList{
|
||||
ListID: fullTask.ListID,
|
||||
|
@ -803,7 +803,7 @@ func createTask(s *xorm.Session, t *Task, a web.Auth, updateAssignees bool) (err
|
|||
}
|
||||
|
||||
// If there is a bucket set, make sure they belong to the same list as the task
|
||||
err = checkBucketAndTaskBelongToSameList(s, t, bucket)
|
||||
err = checkBucketAndTaskBelongToSameList(t, bucket)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
|
|||
}
|
||||
|
||||
// If there is a bucket set, make sure they belong to the same list as the task
|
||||
err = checkBucketAndTaskBelongToSameList(s, t, bucket)
|
||||
err = checkBucketAndTaskBelongToSameList(t, bucket)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue