mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
@@ -359,12 +359,12 @@ func (c *Comment) LoadPoster(ctx context.Context) (err error) {
|
||||
}
|
||||
|
||||
// AfterDelete is invoked from XORM after the object is deleted.
|
||||
func (c *Comment) AfterDelete() {
|
||||
func (c *Comment) AfterDelete(ctx context.Context) {
|
||||
if c.ID <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
_, err := repo_model.DeleteAttachmentsByComment(c.ID, true)
|
||||
_, err := repo_model.DeleteAttachmentsByComment(ctx, c.ID, true)
|
||||
if err != nil {
|
||||
log.Info("Could not delete files for comment %d on issue #%d: %s", c.ID, c.IssueID, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user