fix(subscriptions): do not panic when a task does not have a subscription
(cherry picked from commit 75f3e930cd8072fc6709d1e653b177263d02c8ce)
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user