summaryrefslogtreecommitdiff
path: root/internal/processing/media/update.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/media/update.go')
-rw-r--r--internal/processing/media/update.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/media/update.go b/internal/processing/media/update.go
index 6f15f2ace..e6c78563d 100644
--- a/internal/processing/media/update.go
+++ b/internal/processing/media/update.go
@@ -46,7 +46,7 @@ func (p *processor) Update(ctx context.Context, account *gtsmodel.Account, media
if form.Description != nil {
attachment.Description = text.RemoveHTML(*form.Description)
- if err := p.db.UpdateByID(ctx, mediaAttachmentID, attachment); err != nil {
+ if err := p.db.UpdateByPrimaryKey(ctx, attachment); err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("database error updating description: %s", err))
}
}
@@ -58,7 +58,7 @@ func (p *processor) Update(ctx context.Context, account *gtsmodel.Account, media
}
attachment.FileMeta.Focus.X = focusx
attachment.FileMeta.Focus.Y = focusy
- if err := p.db.UpdateByID(ctx, mediaAttachmentID, attachment); err != nil {
+ if err := p.db.UpdateByPrimaryKey(ctx, attachment); err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("database error updating focus: %s", err))
}
}