Fix error when searching for a namespace returned no results

This commit is contained in:
kolaente 2021-05-26 12:00:55 +02:00
parent 88b9ea6a96
commit 3f6d85497f
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
2 changed files with 14 additions and 0 deletions

View file

@ -487,6 +487,10 @@ func (n *Namespace) ReadAll(s *xorm.Session, a web.Auth, search string, page int
namespaceIDs, ownerIDs := getNamespaceOwnerIDs(namespaces)
if len(namespaceIDs) == 0 {
return nil, 0, 0, nil
}
subscriptionsMap, err := getNamespaceSubscriptions(s, namespaceIDs, doer.ID)
if err != nil {
return nil, 0, 0, err