mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 16:27:29 -06:00
fixes + db changes (#204)
* fixes + db changes * make duration more lenient
This commit is contained in:
parent
446dbb7a72
commit
e681aac589
16 changed files with 401 additions and 78 deletions
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue