fix: don't try to load the namespace of a list if it is a shared list

This commit is contained in:
kolaente 2021-10-16 16:50:16 +02:00
parent c2b6119434
commit d7e47a28d4
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -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