Fix updatePrepaid.js user updates
This commit is contained in:
parent
1e0aa1a375
commit
c3381c1274
1 changed files with 8 additions and 4 deletions
|
@ -60,7 +60,11 @@ var updatePrepaid = function updatePrepaid(stringID, originalUpdate) {
|
|||
)
|
||||
}
|
||||
|
||||
var userUpdate = _.pick(originalUpdate, 'startDate', 'endDate' );
|
||||
var userUpdate = _(originalUpdate)
|
||||
.pick('startDate', 'endDate' )
|
||||
.transform(function(result, value, key) { result['coursePrepaid.'+key] = value })
|
||||
.value();
|
||||
|
||||
if (_.isEmpty(userUpdate)) {
|
||||
print('\nSkipping user update, nothing to update.')
|
||||
}
|
||||
|
|
Reference in a new issue