mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Fixing warnings
This commit is contained in:
parent
aa7f47a4f4
commit
586b2038b6
@ -3,17 +3,16 @@ import datetime
|
|||||||
import typing as t
|
import typing as t
|
||||||
from peewee import (
|
from peewee import (
|
||||||
CharField,
|
CharField,
|
||||||
# AutoField,
|
|
||||||
DateTimeField,
|
DateTimeField,
|
||||||
BooleanField,
|
BooleanField,
|
||||||
IntegerField,
|
IntegerField,
|
||||||
ForeignKeyField,
|
|
||||||
)
|
)
|
||||||
from playhouse.shortcuts import model_to_dict
|
from playhouse.shortcuts import model_to_dict
|
||||||
|
|
||||||
from app.classes.shared.main_models import DatabaseShortcuts
|
from app.classes.shared.main_models import DatabaseShortcuts
|
||||||
from app.classes.models.base_model import BaseModel
|
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
|
from app.classes.shared.helpers import Helpers
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -575,7 +575,7 @@ class Controller:
|
|||||||
role_id = role
|
role_id = role
|
||||||
self.server_perms.add_role_server(new_server_id, role_id, "11111111")
|
self.server_perms.add_role_server(new_server_id, role_id, "11111111")
|
||||||
|
|
||||||
return new_server_id, server_fs_uuid
|
return new_server_id
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def verify_jar_server(server_path: str, server_jar: str):
|
def verify_jar_server(server_path: str, server_jar: str):
|
||||||
|
@ -723,9 +723,7 @@ class ApiServersIndexHandler(BaseApiHandler):
|
|||||||
405, {"status": "error", "error": "DATA CONSTRAINT FAILED"}
|
405, {"status": "error", "error": "DATA CONSTRAINT FAILED"}
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
new_server_id, new_server_uuid = self.controller.create_api_server(
|
new_server_id = self.controller.create_api_server(data, user["user_id"])
|
||||||
data, user["user_id"]
|
|
||||||
)
|
|
||||||
|
|
||||||
self.controller.servers.stats.record_stats()
|
self.controller.servers.stats.record_stats()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user