fix(views): return correct error

This commit is contained in:
kolaente 2024-03-18 23:09:50 +01:00
parent b7b3169169
commit 803f58f402
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 0 deletions

View File

@ -938,6 +938,9 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
var targetBucketID int64
if t.BucketID != 0 {
bucket, has := buckets[t.BucketID]
if !has {
return ErrBucketDoesNotExist{BucketID: t.BucketID}
}
if has && bucket.ProjectViewID == view.ID {
targetBucketID = t.BucketID
}