aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-04-20 15:28:16 +0200
committerRigel Kent <par@rigelk.eu>2020-05-01 16:41:02 +0200
commit197876ea87494f9c8f5262fa371b0f70e3c56fb5 (patch)
treef16db617292c63a7d7385c40d4983d30c6542033 /server/models
parentefa012edad6b9b4c38a21a5c7d06ce0f7089d22c (diff)
downloadPeerTube-197876ea87494f9c8f5262fa371b0f70e3c56fb5.tar.gz
PeerTube-197876ea87494f9c8f5262fa371b0f70e3c56fb5.tar.zst
PeerTube-197876ea87494f9c8f5262fa371b0f70e3c56fb5.zip
Add tests for video-abuse persistence after video deletion
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video-abuse.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts
index 285fb1fbc..628f1caa6 100644
--- a/server/models/video/video-abuse.ts
+++ b/server/models/video/video-abuse.ts
@@ -143,7 +143,8 @@ export enum ScopeNames {
143 'SELECT count(DISTINCT "videoAbuse"."id") ' + 143 'SELECT count(DISTINCT "videoAbuse"."id") ' +
144 'FROM "videoAbuse" ' + 144 'FROM "videoAbuse" ' +
145 `WHERE CAST("deletedVideo"->'channel'->'ownerAccount'->>'id' AS INTEGER) = "Video->VideoChannel"."accountId" ` + 145 `WHERE CAST("deletedVideo"->'channel'->'ownerAccount'->>'id' AS INTEGER) = "Video->VideoChannel"."accountId" ` +
146 `OR CAST("deletedVideo"->'channel'->'ownerAccount'->>'id' AS INTEGER) = CAST("VideoAbuseModel"."deletedVideo"->'channel'->'ownerAccount'->>'id' AS INTEGER) ` + 146 `OR CAST("deletedVideo"->'channel'->'ownerAccount'->>'id' AS INTEGER) = ` +
147 `CAST("VideoAbuseModel"."deletedVideo"->'channel'->'ownerAccount'->>'id' AS INTEGER) ` +
147 ')' 148 ')'
148 ), 149 ),
149 'countReportsForReportee__deletedVideo' 150 'countReportsForReportee__deletedVideo'