Fix conflict rate serializations
[oweals/peertube.git] / server / lib / activitypub / process / process-create.ts
index c88082bbf537cd0d174d681e048b32a26b451f43..4740dc4328d5fd7e6ef521e52b34220128b9ca47 100644 (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