summaryrefslogtreecommitdiff
path: root/internal/processing/media/unattach.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/media/unattach.go')
-rw-r--r--internal/processing/media/unattach.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/processing/media/unattach.go b/internal/processing/media/unattach.go
index bb09525fe..5ef8f81f4 100644
--- a/internal/processing/media/unattach.go
+++ b/internal/processing/media/unattach.go
@@ -43,10 +43,11 @@ func (p *processor) Unattach(ctx context.Context, account *gtsmodel.Account, med
return nil, gtserror.NewErrorNotFound(errors.New("attachment not owned by requesting account"))
}
+ updatingColumns := []string{"updated_at", "status_id"}
attachment.UpdatedAt = time.Now()
attachment.StatusID = ""
- if err := p.db.UpdateByPrimaryKey(ctx, attachment); err != nil {
+ if err := p.db.UpdateByPrimaryKey(ctx, attachment, updatingColumns...); err != nil {
return nil, gtserror.NewErrorNotFound(fmt.Errorf("db error updating attachment: %s", err))
}