Merge pull request #44468 from DSRCorporation/bugs/mongo_users_do_not_fetch_twice

Do not perform the same request twice.
This commit is contained in:
Nicole Thomas 2017-11-10 08:13:30 -07:00 committed by GitHub
commit 75d26bf112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,8 +111,6 @@ def present(name,
# check if user exists # check if user exists
users = __salt__['mongodb.user_find'](name, user, password, host, port, database, authdb) users = __salt__['mongodb.user_find'](name, user, password, host, port, database, authdb)
if len(users) > 0: if len(users) > 0:
# check each user occurrence
users = __salt__['mongodb.user_find'](name, user, password, host, port, database, authdb)
# check each user occurrence # check each user occurrence
for usr in users: for usr in users:
# prepare empty list for current roles # prepare empty list for current roles