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:
parent
3505285663
commit
7fa3d494e2
@ -990,7 +990,7 @@ class UserServiceManager(metaclass=singleton.Singleton):
|
|||||||
|
|
||||||
# Get pool members. Just pools "visible" and "usable"
|
# Get pool members. Just pools "visible" and "usable"
|
||||||
poolMembers = [
|
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
|
# Sort pools based on meta selection
|
||||||
if meta.policy == MetaPool.PRIORITY_POOL:
|
if meta.policy == MetaPool.PRIORITY_POOL:
|
||||||
|
Loading…
Reference in New Issue
Block a user