Fix conflict rate serializations

This commit is contained in:
Chocobozzz
2017-11-30 13:51:53 +01:00
parent 4f49137101
commit f00984c007
3 changed files with 30 additions and 22 deletions

View File

@@ -63,7 +63,7 @@ function createVideoDislike (byAccount: AccountInstance, activity: ActivityCreat
defaults: rate,
transaction: t
})
await video.increment('dislikes', { transaction: t })
if (created === true) await video.increment('dislikes', { transaction: t })
if (video.isOwned() && created === true) {
// Don't resend the activity to the sender