mirror of https://github.com/Chocobozzz/PeerTube
Fix abuse crash on deleted reporter account
parent
efd4ff5fbc
commit
82b9a1005c
|
@ -171,6 +171,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
|
|||
|
||||
isLocalAbuse (abuse: AdminAbuse) {
|
||||
if (this.viewType === 'user') return true
|
||||
if (!abuse.reporterAccount) return false
|
||||
|
||||
return Actor.IS_LOCAL(abuse.reporterAccount.host)
|
||||
}
|
||||
|
|
|
@ -48,7 +48,10 @@ function buildAbuseListQuery (options: BuildAbusesQueryOptions, type: 'count' |
|
|||
]
|
||||
|
||||
if (options.serverAccountId || options.userAccountId) {
|
||||
whereAnd.push('"abuse"."reporterAccountId" NOT IN (' + buildBlockedAccountSQL([ options.serverAccountId, options.userAccountId ]) + ')')
|
||||
whereAnd.push(
|
||||
'"abuse"."reporterAccountId" IS NULL OR ' +
|
||||
'"abuse"."reporterAccountId" NOT IN (' + buildBlockedAccountSQL([ options.serverAccountId, options.userAccountId ]) + ')'
|
||||
)
|
||||
}
|
||||
|
||||
if (options.reporterAccountId) {
|
||||
|
|
Loading…
Reference in New Issue