From f019ae42bb1e55984d53d4c92635b62eedd6aa2b Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 8 Sep 2021 17:40:33 +0200 Subject: [PATCH] Fix exporting tasks from archived lists --- pkg/models/export.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/models/export.go b/pkg/models/export.go index 101689d8..eb7d4f70 100644 --- a/pkg/models/export.go +++ b/pkg/models/export.go @@ -123,7 +123,7 @@ func ExportUserData(s *xorm.Session, u *user.User) (err error) { func exportListsAndTasks(s *xorm.Session, u *user.User, wr *zip.Writer) (err error) { - namspaces, _, _, err := (&Namespace{}).ReadAll(s, u, "", -1, 0) + namspaces, _, _, err := (&Namespace{IsArchived: true}).ReadAll(s, u, "", -1, 0) if err != nil { return err } @@ -173,11 +173,11 @@ func exportListsAndTasks(s *xorm.Session, u *user.User, wr *zip.Writer) (err err listMap := make(map[int64]*ListWithTasksAndBuckets) listIDs := []int64{} - for _, n := range namespaces { - for _, l := range n.Lists { - listMap[l.ID] = l - listIDs = append(listIDs, l.ID) + for _, l := range lists { + listMap[l.ID] = &ListWithTasksAndBuckets{ + List: *l, } + listIDs = append(listIDs, l.ID) } taskMap := make(map[int64]*TaskWithComments, len(tasks))