From 493c7b6d5efa990ed224a4bacc777551fababf22 Mon Sep 17 00:00:00 2001 From: Kathleen Tuite Date: Tue, 12 Sep 2023 12:27:59 -0700 Subject: [PATCH] Fix to analytics saving extra property in wrong place --- lib/model/query/analytics.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/model/query/analytics.js b/lib/model/query/analytics.js index 202ee31b4..cb92d921a 100644 --- a/lib/model/query/analytics.js +++ b/lib/model/query/analytics.js @@ -631,8 +631,10 @@ const previewMetrics = () => (({ Analytics }) => Promise.all([ metrics.system.num_questions_biggest_form = bigForm; for (const [key, value] of Object.entries(admins)) metrics.system.num_admins[key] = value; - for (const [key, value] of Object.entries(audits)) - metrics.system.num_audit_log_entries[key] = value; + + metrics.system.num_audit_log_entries.recent = audits.recent; + metrics.system.num_audit_log_entries.total = audits.total; + metrics.projects = projMetrics; metrics.system.uses_external_db = Analytics.databaseExternal(config.get('default.database.host'));