fix(projects): don't fail to fetch a task if there's a broken subscription record associated to it

This commit is contained in:
kolaente 2023-06-07 20:30:14 +02:00
parent e66344c21e
commit 43ef5f98d8
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 0 deletions

View File

@ -1716,5 +1716,9 @@ func (t *Task) ReadOne(s *xorm.Session, a web.Auth) (err error) {
*t = *taskMap[t.ID]
t.Subscription, err = GetSubscription(s, SubscriptionEntityTask, t.ID, a)
if err != nil && IsErrProjectDoesNotExist(err) {
return nil
}
return
}