Ensure read preference is never overriden, so DB config prevails (#4833)

This commit is contained in:
Florent Vilmart
2018-06-13 13:51:29 -04:00
parent cddb924703
commit 4d81f8fc30
2 changed files with 15 additions and 12 deletions

View File

@@ -626,8 +626,6 @@ export class MongoStorageAdapter implements StorageAdapter {
readPreference = ReadPreference.NEAREST;
break;
case undefined:
// this is to match existing tests, which were failing as mongodb@3.0 don't report readPreference anymore
readPreference = ReadPreference.PRIMARY;
break;
default:
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'Not supported read preference.');