aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-03 09:43:00 +0200
committerChocobozzz <me@florianbigard.com>2018-08-06 11:19:16 +0200
commit516df59b3bbb0218afeda595ee4966800bff4519 (patch)
tree4687691eeb0bf9c2846b673253c54628409345d1 /server/models
parentd7f83948a1af0ef3bed61f83e87e826902c96f7d (diff)
downloadPeerTube-516df59b3bbb0218afeda595ee4966800bff4519.tar.gz
PeerTube-516df59b3bbb0218afeda595ee4966800bff4519.tar.zst
PeerTube-516df59b3bbb0218afeda595ee4966800bff4519.zip
Remove ability to delete video imports
Users should remove the linked video instead
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index f32010014..67711b102 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -957,8 +957,10 @@ export class VideoModel extends Model<VideoModel> {
957 }) 957 })
958 } 958 }
959 959
960 static load (id: number) { 960 static load (id: number, t?: Sequelize.Transaction) {
961 return VideoModel.findById(id) 961 const options = t ? { transaction: t } : undefined
962
963 return VideoModel.findById(id, options)
962 } 964 }
963 965
964 static loadByUrlAndPopulateAccount (url: string, t?: Sequelize.Transaction) { 966 static loadByUrlAndPopulateAccount (url: string, t?: Sequelize.Transaction) {