From e681aac5899b4a93d7c71e9a334a67c3f2b00e93 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 10 Sep 2021 14:36:10 +0200 Subject: fixes + db changes (#204) * fixes + db changes * make duration more lenient --- internal/processing/media/update.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/processing/media/update.go') 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)) } } -- cgit v1.2.3