mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
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:
commit
75d26bf112
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user