1
0
Fork 0

Fix restoring of document metadata after clearing

Previous to this change, we'd write the clear to the database, but
then immediately after, the quote save would restore it.  Oops.

* src/server/Server.js (_monitorMetadataPromise): Clear data in
    metabucket rather than directly invoking a DB call.  This will be
    applied when the quote is saved.
master
Mike Gerwitz 2017-09-07 15:31:43 -04:00
parent 7a16f8b295
commit 73354e39d0
1 changed files with 1 additions and 3 deletions

View File

@ -1148,9 +1148,7 @@ module.exports = Class( 'Server' )
'private _monitorMetadataPromise'( quote, dapis, meta_clear )
{
// save metadata clear to database to prevent stale data from being
// used while requests are pending
this.dao.saveQuoteMeta( quote, meta_clear, null, e => { throw e; } );
quote.getMetabucket().setValues( meta_clear );
dapis.map( promise => promise
.then( ( { field, index, data } ) =>