From d7e47a28d4bb04d4c7c3ed85a263134180da447a Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 16 Oct 2021 16:50:16 +0200 Subject: [PATCH] fix: don't try to load the namespace of a list if it is a shared list --- pkg/models/list.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/models/list.go b/pkg/models/list.go index fc899e0f6..8c3334384 100644 --- a/pkg/models/list.go +++ b/pkg/models/list.go @@ -544,7 +544,7 @@ func (l *List) CheckIsArchived(s *xorm.Session) (err error) { func CreateOrUpdateList(s *xorm.Session, list *List, auth web.Auth) (err error) { // Check if the namespace exists - if list.NamespaceID != 0 && list.NamespaceID != FavoritesPseudoNamespace.ID { + if list.NamespaceID > 0 { _, err = GetNamespaceByID(s, list.NamespaceID) if err != nil { return err @@ -620,10 +620,6 @@ func CreateOrUpdateList(s *xorm.Session, list *List, auth web.Auth) (err error) } } - if err != nil { - return - } - l, err := GetListSimpleByID(s, list.ID) if err != nil { return err