Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 6e1314e

Browse files
WardormeurDanielBrierton
authored andcommitted
Fix issue when editing kids user profile's newsletter preferences
1 parent 2cb01f9 commit 6e1314e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

profiles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ module.exports = function (options) {
245245
var fieldsToBeRemoved = _.union(derivedFields, immutableFields);
246246

247247
profile = _.omit(profile, fieldsToBeRemoved);
248-
seneca.act({role: plugin, cmd: 'save', profile: profile}, function (err, profile) {
248+
var cleanedProfile = _.omit(profile, 'user');
249+
seneca.act({role: plugin, cmd: 'save', profile: cleanedProfile}, function (err, savedProfile) {
249250
if (err) {
250251
return done(err);
251252
}

0 commit comments

Comments
 (0)