1
0

fix(subscriptions): do not panic when a task does not have a subscription

(cherry picked from commit 75f3e930cd8072fc6709d1e653b177263d02c8ce)
This commit is contained in:
kolaente
2024-09-04 21:55:14 +02:00
parent 8b8ec19bb3
commit 95ef4e1045
2 changed files with 4 additions and 2 deletions

View File

@ -171,7 +171,7 @@ func (sb *Subscription) Delete(s *xorm.Session, auth web.Auth) (err error) {
func GetSubscriptionForUser(s *xorm.Session, entityType SubscriptionEntityType, entityID int64, a web.Auth) (subscription *SubscriptionWithUser, err error) {
u, is := a.(*user.User)
if u != nil && !is {
if !is || u == nil {
return
}