mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Make model *_exists functions way more efficient
This commit is contained in:
@ -205,9 +205,7 @@ class HelperServers:
|
||||
|
||||
@staticmethod
|
||||
def server_id_exists(server_id):
|
||||
if not HelperServers.get_server_data_by_id(server_id):
|
||||
return False
|
||||
return True
|
||||
return Servers.select().where(Servers.server_id == server_id).count() != 0
|
||||
|
||||
@staticmethod
|
||||
def sever_crashed(server_id):
|
||||
|
Reference in New Issue
Block a user