mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix bug where invalid server Id leads to stack
This commit is contained in:
parent
1d32afa09d
commit
5f2236563b
@ -462,7 +462,10 @@ class ServersController(metaclass=Singleton):
|
||||
|
||||
@staticmethod
|
||||
def server_id_exists(server_id):
|
||||
srv = ServersController().get_server_instance_by_id(server_id)
|
||||
try:
|
||||
srv = ServersController().get_server_instance_by_id(server_id)
|
||||
except ValueError:
|
||||
return False
|
||||
return srv.stats_helper.server_id_exists()
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user