Skip to content

Commit

Permalink
MongoDBSessionInterface to use the default database name in uri
Browse files Browse the repository at this point in the history
  • Loading branch information
yarreg committed Jul 10, 2024
1 parent bc2fe67 commit 6b8eade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flask_session/mongodb/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(
client = MongoClient()

self.client = client
self.store = client[db][collection]
self.store = client.get_default_database(default=db)[collection]
self.use_deprecated_method = int(version.split(".")[0]) < 4

# Create a TTL index on the expiration time, so that mongo can automatically delete expired sessions
Expand Down

0 comments on commit 6b8eade

Please sign in to comment.