fix: don't try to load the namespace of a list if it is a shared list
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2021-10-16 16:50:16 +02:00
parent c2b6119434
commit d7e47a28d4
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 5 deletions

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