Fix bug where no file error doesn't show up

This commit is contained in:
amcmanu3 2023-11-29 22:28:18 -05:00
parent 8bad0fb0a9
commit 3840cc3863

View File

@ -7,6 +7,7 @@ from jsonschema.exceptions import ValidationError
from app.classes.models.crafty_permissions import EnumPermissionsCrafty
from app.classes.shared.helpers import Helpers
from app.classes.web.base_api_handler import BaseApiHandler
from app.classes.web.websocket_handler import WebSocketManager
logger = logging.getLogger(__name__)
files_get_schema = {
@ -73,7 +74,7 @@ class ApiImportFilesIndexHandler(BaseApiHandler):
else:
if user_id:
user_lang = self.controller.users.get_user_lang_by_id(user_id)
self.helper.websocket_helper.broadcast_user(
WebSocketManager().broadcast_user(
user_id,
"send_start_error",
{
@ -85,7 +86,7 @@ class ApiImportFilesIndexHandler(BaseApiHandler):
else:
if not self.helper.check_path_exists(folder) and user_id:
user_lang = self.controller.users.get_user_lang_by_id(user_id)
self.helper.websocket_helper.broadcast_user(
WebSocketManager().broadcast_user(
user_id,
"send_start_error",
{