mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

mongodb URI empty fields overwrite keyword arguments

Open edman opened this issue 10 years ago • 0 comments

The documentation states that

Database, username and password from URI string overrides corresponding parameters in connect()

In my understanding that meant that parameters passed through the URI would override keyword parameters, but it turns out that everything is overridden. Including information not specified in the URI.

In the following call username and password are given as keyword parameters, and later on (connection.py#L62) get overridden by the URI information, which is None. mongoengine.connect('mydb', username='user', password='passwd', host='mongodb://localhost:27017')

edman avatar Feb 08 '15 06:02 edman