Skip to content

MONGO_URI raises exception when no database is specified #1037

@nicolaiarocci

Description

@nicolaiarocci

The mongo data layer raises an exception when MONGO_URI does not contain a database name. However, the MongoDB URI syntax states that only the host is required and for good reasons.

In certain scenarios, it might be useful to set the ReplicaSet and other options with the URI, and then set the database dynamically with MONGO_DBNAME, maybe depending on the user performing the request.

The current implementation mimics Flask_PyMongo behavior. However, since we recently dropped that dependency, we are free to improve in this area.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions