From 250da0abf74b4a5d2260d918f2751d9f88dd37e8 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Thu, 27 Oct 2022 18:40:13 +0200 Subject: [PATCH] Removed fallback to clicked count for opened count fixes https://github.com/TryGhost/Team/issues/2189 We don't want this fallback because the table on the analytics page will be empty while the count be higher than zero --- .../api/endpoints/utils/serializers/output/mappers/posts.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js b/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js index 2083347db3..fe8fe1ce1a 100644 --- a/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js +++ b/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js @@ -111,10 +111,7 @@ module.exports = async (model, frame, options = {}) => { if (jsonModel.email && jsonModel.count) { jsonModel.email.opened_count = Math.min( - Math.max( - jsonModel.email.opened_count || 0, - jsonModel.count.clicks || 0 - ), + jsonModel.email.opened_count || 0, jsonModel.email.email_count ); }