fix(views): return correct error
This commit is contained in:
parent
b7b3169169
commit
803f58f402
@ -938,6 +938,9 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
|
|||||||
var targetBucketID int64
|
var targetBucketID int64
|
||||||
if t.BucketID != 0 {
|
if t.BucketID != 0 {
|
||||||
bucket, has := buckets[t.BucketID]
|
bucket, has := buckets[t.BucketID]
|
||||||
|
if !has {
|
||||||
|
return ErrBucketDoesNotExist{BucketID: t.BucketID}
|
||||||
|
}
|
||||||
if has && bucket.ProjectViewID == view.ID {
|
if has && bucket.ProjectViewID == view.ID {
|
||||||
targetBucketID = t.BucketID
|
targetBucketID = t.BucketID
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user