diff options
author | 2021-09-10 14:36:10 +0200 | |
---|---|---|
committer | 2021-09-10 14:36:10 +0200 | |
commit | e681aac5899b4a93d7c71e9a334a67c3f2b00e93 (patch) | |
tree | 748a916a058dff03e42e5aebbfa7f98f8f6288ad /internal/processing/media/update.go | |
parent | remove boosted statuses from public (federated timeline) (#201) (diff) | |
download | gotosocial-e681aac5899b4a93d7c71e9a334a67c3f2b00e93.tar.xz |
fixes + db changes (#204)
* fixes + db changes
* make duration more lenient
Diffstat (limited to 'internal/processing/media/update.go')
-rw-r--r-- | internal/processing/media/update.go | 4 |
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)) } } |