Core introduced a type field to profiles, so now GUI's worker_thread with profile creation needs that field

This commit is contained in:
SimplifiedPrivacy 2026-07-20 13:10:49 -04:00
parent 75bd51b8f8
commit b8d8689885
3 changed files with 17 additions and 5 deletions

View file

@ -149,7 +149,7 @@ if is_compatable:
except: except:
logger.info(f"[DB MANAGEMENT] create ALL tables failed. Running migrations...") logger.info(f"[DB MANAGEMENT] create ALL tables failed. Running migrations...")
migration = migrate_sql() migration = migrate_sql()
logger.info(f"[DB MANAGEMENT] Results of migration is {made_tables}") logger.info(f"[DB MANAGEMENT] Results of migration is {migration.valid}")
if not migration.valid: if not migration.valid:
db_version_you_have = 0 db_version_you_have = 0

View file

@ -14,6 +14,7 @@ from core.controllers.SubscriptionPlanController import SubscriptionPlanControll
from core.models.session.SessionConnection import SessionConnection from core.models.session.SessionConnection import SessionConnection
from core.models.session.SessionProfile import SessionProfile from core.models.session.SessionProfile import SessionProfile
from core.models.system.SystemConnection import SystemConnection from core.models.system.SystemConnection import SystemConnection
from core.models.BaseProfile import ProfileType
from core.models.system.SystemProfile import SystemProfile from core.models.system.SystemProfile import SystemProfile
from gui.v2.infrastructure.setup_observers import ( from gui.v2.infrastructure.setup_observers import (
@ -189,12 +190,23 @@ class WorkerThread(QThread):
resolution = self.profile_data['resolution'] resolution = self.profile_data['resolution']
connection = SessionConnection(connection_type, mask_connection) connection = SessionConnection(connection_type, mask_connection)
profile = SessionProfile( profile = SessionProfile(
profile_id, name, None, location, resolution, application_version, connection) id=profile_id,
name=name,
subscription=None,
type=ProfileType.SESSION,
location=location,
resolution=resolution,
application_version=application_version,
connection=connection)
elif profile_type == "system": elif profile_type == "system":
connection = SystemConnection(connection_type) connection = SystemConnection(connection_type)
profile = SystemProfile( profile = SystemProfile(
profile_id, name, None, location, connection) id=profile_id,
name=name,
type=ProfileType.SYSTEM,
subscription=None,
location=location,
connection=connection)
else: else:
self.text_output.emit(f"Invalid profile type: {profile_type}") self.text_output.emit(f"Invalid profile type: {profile_type}")
return return

View file

@ -12,7 +12,7 @@ classifiers = [
"Operating System :: POSIX :: Linux", "Operating System :: POSIX :: Linux",
] ]
dependencies = [ dependencies = [
"sp-hydra-veil-core == 2.4.0", "sp-hydra-veil-core == 2.4.3",
"pyperclip ~= 1.9.0", "pyperclip ~= 1.9.0",
"pyqt6 ~= 6.7.1", "pyqt6 ~= 6.7.1",
"qrcode[pil] ~= 8.2" "qrcode[pil] ~= 8.2"