mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 14:52:26 -05:00
[bugfix] Fix multiple "updated_at" columns for media updates (#1660)
* [bugfix] Fix multiple "updated_at" columns for media updates * silly unrelated race condition
This commit is contained in:
parent
d9bbcc60a6
commit
60639a6a0e
3 changed files with 4 additions and 9 deletions
|
|
@ -328,10 +328,8 @@ func (m *manager) uncacheAttachment(ctx context.Context, attachment *gtsmodel.Me
|
|||
}
|
||||
|
||||
// Update attachment to reflect that we no longer have it cached.
|
||||
attachment.UpdatedAt = time.Now()
|
||||
cached := false
|
||||
attachment.Cached = &cached
|
||||
return m.state.DB.UpdateAttachment(ctx, attachment, "updated_at", "cached")
|
||||
attachment.Cached = func() *bool { i := false; return &i }()
|
||||
return m.state.DB.UpdateAttachment(ctx, attachment, "cached")
|
||||
}
|
||||
|
||||
func (m *manager) removeFiles(ctx context.Context, keys ...string) (int, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue