diff --git a/core/server/services/members/service.js b/core/server/services/members/service.js index f4eabeafd3..42b78fc677 100644 --- a/core/server/services/members/service.js +++ b/core/server/services/members/service.js @@ -74,8 +74,10 @@ const membersImporter = new MembersCSVImporter({ const processImport = async (options) => { const result = await membersImporter.process(options); + const freezeTriggered = result.meta.freeze; + delete result.meta.freeze; - if (result.meta.freeze) { + if (freezeTriggered) { limits.init({ emails: { disabled: true, diff --git a/test/regression/api/canary/admin/members.test.js b/test/regression/api/canary/admin/members.test.js index ff02373971..364709b28a 100644 --- a/test/regression/api/canary/admin/members.test.js +++ b/test/regression/api/canary/admin/members.test.js @@ -501,7 +501,8 @@ describe('Members API (canary)', function () { const jsonResponse = res.body; should.exist(jsonResponse); - should.not.exist(jsonResponse.meta); + should.exist(jsonResponse.meta); + should.not.exist(jsonResponse.meta.stats); }); }); diff --git a/test/regression/api/v3/admin/members.test.js b/test/regression/api/v3/admin/members.test.js index c8075b4aa5..0d2f1ef80a 100644 --- a/test/regression/api/v3/admin/members.test.js +++ b/test/regression/api/v3/admin/members.test.js @@ -460,7 +460,8 @@ describe('Members API', function () { const jsonResponse = res.body; should.exist(jsonResponse); - should.not.exist(jsonResponse.meta); + should.exist(jsonResponse.meta); + should.not.exist(jsonResponse.meta.stats); }); });