Skip to content

Commit

Permalink
Fix read_preference SECONDARY
Browse files Browse the repository at this point in the history
  • Loading branch information
aarranz committed Dec 10, 2024
1 parent 89b1037 commit 5dc2904
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion odata_server/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import abnf
import pymongo.database
import pymongo.errors
from bson.son import SON
from flask import abort, request, url_for

Expand Down Expand Up @@ -451,7 +452,7 @@ def get_collection(
mongo_collection = db.get_collection(
RootEntitySet.mongo_collection,
).with_options(
read_concern=pymongo.ReadPreference.SECONDARY_PREFERRED,
read_preference=pymongo.ReadPreference.SECONDARY_PREFERRED,
)
if prefix:
seq_filter = {"Seq": filters.pop("Seq")} if "Seq" in filters else None
Expand Down

0 comments on commit 5dc2904

Please sign in to comment.