From 586b2038b64a740cd5e3c1977655b7048f69035f Mon Sep 17 00:00:00 2001 From: Silversthorn Date: Fri, 10 Nov 2023 23:16:04 +0100 Subject: [PATCH] Fixing warnings --- app/classes/models/servers.py | 5 ++--- app/classes/shared/main_controller.py | 2 +- app/classes/web/routes/api/servers/index.py | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/classes/models/servers.py b/app/classes/models/servers.py index d7061e09..28cd8998 100644 --- a/app/classes/models/servers.py +++ b/app/classes/models/servers.py @@ -3,17 +3,16 @@ import datetime import typing as t from peewee import ( CharField, - # AutoField, DateTimeField, BooleanField, IntegerField, - ForeignKeyField, ) from playhouse.shortcuts import model_to_dict from app.classes.shared.main_models import DatabaseShortcuts from app.classes.models.base_model import BaseModel -from app.classes.models.users import Users + +# from app.classes.models.users import Users from app.classes.shared.helpers import Helpers logger = logging.getLogger(__name__) diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index aca0bd45..6f85c25e 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -575,7 +575,7 @@ class Controller: role_id = role self.server_perms.add_role_server(new_server_id, role_id, "11111111") - return new_server_id, server_fs_uuid + return new_server_id @staticmethod def verify_jar_server(server_path: str, server_jar: str): diff --git a/app/classes/web/routes/api/servers/index.py b/app/classes/web/routes/api/servers/index.py index 8c4c1669..3c14f604 100644 --- a/app/classes/web/routes/api/servers/index.py +++ b/app/classes/web/routes/api/servers/index.py @@ -723,9 +723,7 @@ class ApiServersIndexHandler(BaseApiHandler): 405, {"status": "error", "error": "DATA CONSTRAINT FAILED"} ) return - new_server_id, new_server_uuid = self.controller.create_api_server( - data, user["user_id"] - ) + new_server_id = self.controller.create_api_server(data, user["user_id"]) self.controller.servers.stats.record_stats()