Skip to content

Commit f8c3bc8

Browse files
committed
2 parents 85eeba0 + de0d277 commit f8c3bc8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flask_mongoengine/connection.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,9 @@ def _resolve_settings(conn_setting, removePass=True):
262262
resolved['password'] = password
263263
resolved['port'] = port
264264
resolved['username'] = username
265-
if conn_setting.pop('replicaset', None):
266-
resolved['replicaSet'] = conn_setting.pop('replicaset', None)
265+
replica_set = conn_setting.pop('replicaset', None)
266+
if replica_set:
267+
resolved['replicaSet'] = replica_set
267268

268269
host = resolved['host']
269270
# Handle uri style connections

0 commit comments

Comments
 (0)