From b8b6899cf3e647d17c1ac315624ecf50cc18bb43 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Fri, 27 May 2022 13:43:57 +0200 Subject: [PATCH] Update modified timestamp when updating motion --- internal/models/motions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/models/motions.go b/internal/models/motions.go index c49971f..5e9dfdb 100644 --- a/internal/models/motions.go +++ b/internal/models/motions.go @@ -820,8 +820,8 @@ func (m *MotionModel) GetByID(ctx context.Context, id int64) (*Motion, error) { func (m *MotionModel) Update(ctx context.Context, id int64, voteType *VoteType, title string, content string, due time.Time) error { _, err := m.DB.ExecContext( ctx, - `UPDATE decisions SET title=?, content=?, votetype=?, due=? WHERE id=?`, - title, content, voteType, due.UTC(), id, + `UPDATE decisions SET title=?, content=?, votetype=?, due=?, modified=? WHERE id=?`, + title, content, voteType, due.UTC(), time.Now().UTC(), id, ) if err != nil { return fmt.Errorf("could not update decision: %w", err)