From e16c5f72caa4b2cc7bb3d38f139bf9df27df57c5 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 15 Jan 2021 22:50:55 +0100 Subject: [PATCH] Fix setting the user in created_by when uploading an attachment --- pkg/models/task_attachment.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/models/task_attachment.go b/pkg/models/task_attachment.go index a5ba835d568..f8b68d75033 100644 --- a/pkg/models/task_attachment.go +++ b/pkg/models/task_attachment.go @@ -74,6 +74,8 @@ func (ta *TaskAttachment) NewAttachment(s *xorm.Session, f io.ReadCloser, realna return err } + ta.CreatedBy, _ = user.GetFromAuth(a) // Ignoring cases where the auth is not a user + return nil }