mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
Delete shadow copies
Delete shadow copies that were created with the report being deleted
This commit is contained in:
parent
33ac0de263
commit
a40422ab99
1 changed files with 6 additions and 0 deletions
|
@ -145,6 +145,12 @@ func RemoveResolvedReports(ctx context.Context, timeout time.Duration) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if report.ShadowCopyID != 0 {
|
||||
_, err := db.GetEngine(ctx).ID(report.ShadowCopyID).Delete(&moderation.AbuseReportShadowCopy{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
log.Trace("Finished: RemoveResolvedReports")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue