Skip to content

Commit

Permalink
ACRFD-13-4: Set mongoose flag to return updated object.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPhura committed Jul 8, 2019
1 parent 380d213 commit 4725e94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/helpers/ttlsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,10 @@ const updateApplicationMeta = function(acrfdApp, tantalisApp) {
updatedAppObject.statusHistoryEffectiveDate = acrfdApp.statusHistoryEffectiveDate;

const ApplicationModel = mongoose.model('Application');
ApplicationModel.findOneAndUpdate({ _id: acrfdApp._id }, updatedAppObject, function(error, updatedApp) {
ApplicationModel.findOneAndUpdate({ _id: acrfdApp._id }, updatedAppObject, { new: true }, function(
error,
updatedApp
) {
if (error) {
defaultLog.error('updateApplicationMeta:', error);
reject(error);
Expand Down

0 comments on commit 4725e94

Please sign in to comment.