Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion django_mongodb_engine/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ def pop(name, default=None):
user = pop('USER')
password = pop('PASSWORD')
options = pop('OPTIONS', {})

options_removed = pop('OPTIONS_REMOVED', [])

self.operation_flags = options.pop('OPERATIONS', {})
if not any(k in ['save', 'delete', 'update']
for k in self.operation_flags):
Expand Down Expand Up @@ -256,6 +257,8 @@ def pop(name, default=None):
safe=False
)
conn_options.update(options)
for k in options_removed:
conn_options.pop(k, None)

try:
self.connection = connection_class(**conn_options)
Expand Down