1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-21 09:34:08 +03:00

Refactor user service to filter enabled pool members directly in query

This commit is contained in:
Adolfo Gómez García 2024-11-08 16:11:09 +01:00
parent 3505285663
commit 7fa3d494e2
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -990,7 +990,7 @@ class UserServiceManager(metaclass=singleton.Singleton):
# Get pool members. Just pools "visible" and "usable"
poolMembers = [
p for p in meta.members.all() if p.pool.isVisible() and p.pool.isUsable() and p.enabled
p for p in meta.members.filter(enabled=True) if p.pool.isVisible() and p.pool.isUsable()
]
# Sort pools based on meta selection
if meta.policy == MetaPool.PRIORITY_POOL: