1
0

fix(export): update only current user export file id

This commit is contained in:
kolaente 2024-12-22 19:48:47 +01:00
parent 3f98f47256
commit d47555e3c2
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -36,6 +36,7 @@ import (
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/api/pkg/utils"
"code.vikunja.io/api/pkg/version"
"xorm.io/xorm"
)
@ -106,7 +107,10 @@ func ExportUserData(s *xorm.Session, u *user.User) (err error) {
// Save the file id with the user
u.ExportFileID = exportFile.ID
_, err = s.Cols("export_file_id").Update(u)
_, err = s.
Where("id = ?", u.ID).
Cols("export_file_id").
Update(u)
if err != nil {
return
}