diff --git a/server/src/uds/core/managers/user_service.py b/server/src/uds/core/managers/user_service.py index abc614d6..8597dee9 100644 --- a/server/src/uds/core/managers/user_service.py +++ b/server/src/uds/core/managers/user_service.py @@ -669,6 +669,12 @@ class UserServiceManager: # Sort pools related to policy now, and xtract only pools, not sort keys # Remove "full" pools (100%) from result and pools in maintenance mode, not ready pools, etc... pools: typing.List[ServicePool] = [p[1] for p in sorted(sortPools, key=lambda x: x[0]) if p[1].usage() < 100 and p[1].isUsable()] + poolsFull: typing.List[ServicePool] = [ + p[1] + for p in sorted(sortPools, key=lambda x: x[0]) + if p[1].usage() == 100 and p[1].isUsable() + ] + logger.debug('Pools: %s', pools) @@ -687,7 +693,7 @@ class UserServiceManager: try: alreadyAssigned: UserService = UserService.objects.filter( - deployed_service__in=pools, + deployed_service__in=pools+poolsFull, state__in=State.VALID_STATES, user=user, cache_level=0 diff --git a/server/src/uds/urls.py b/server/src/uds/urls.py index 1c0ab573..7033c064 100644 --- a/server/src/uds/urls.py +++ b/server/src/uds/urls.py @@ -65,7 +65,7 @@ urlpatterns = [ # Login/logout path(r'uds/page/login', uds.web.views.modern.login, name='page.login'), - re_path(r'^uds/page/login/(?P[a-zA-Z0-9-]+)$', uds.web.views.modern.login, name='page.login.tag'), + re_path(r'^uds/page/login/(?P[a-zA-Z0-9_-]+)$', uds.web.views.modern.login, name='page.login.tag'), path(r'uds/page/logout', uds.web.views.modern.logout, name='page.logout'),