From ea1d06bda646f42332de5682f724367779719d4e Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 23 Dec 2022 17:48:21 +0100 Subject: [PATCH] fix(list): return lists for a namespace id even if that namespace is deleted This fixes a problem where a namespace was deleted and its list were not. Forum discussion: https://community.vikunja.io/t/list-deleted-but-tasks-showing-up-as-archived-and-overdue/1025 --- pkg/models/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/models/list.go b/pkg/models/list.go index c89c104ad..8949f9052 100644 --- a/pkg/models/list.go +++ b/pkg/models/list.go @@ -156,7 +156,7 @@ func GetListsByNamespaceID(s *xorm.Session, nID int64, doer *user.User) (lists [ Alias("l"). Join("LEFT", []string{"namespaces", "n"}, "l.namespace_id = n.id"). Where("l.is_archived = false"). - Where("n.is_archived = false"). + Where("n.is_archived = false OR n.is_archived IS NULL"). Where("namespace_id = ?", nID). Find(&lists) }