X-Problem gelöst
Dieser Commit ist enthalten in:
@ -129,10 +129,14 @@ class SessionController(QObject):
|
||||
Dict mit success, account_id und message
|
||||
"""
|
||||
try:
|
||||
# Platform-Name standardisieren
|
||||
from domain.value_objects.platform_name import PlatformName
|
||||
platform_obj = PlatformName(platform)
|
||||
|
||||
# Account in DB speichern
|
||||
from datetime import datetime
|
||||
account_record = {
|
||||
"platform": platform.lower(),
|
||||
"platform": platform_obj.canonical, # Verwendet kanonischen Namen (lowercase)
|
||||
"username": account_data.get("username", ""),
|
||||
"password": account_data.get("password", ""),
|
||||
"email": account_data.get("email", ""),
|
||||
@ -142,6 +146,18 @@ class SessionController(QObject):
|
||||
}
|
||||
|
||||
account_id = self.db_manager.add_account(account_record)
|
||||
|
||||
# Prüfe ob DB-Operation erfolgreich war
|
||||
if account_id == -1 or account_id is None:
|
||||
error_msg = f"Fehler beim Speichern des Accounts {account_record['username']} in der Datenbank"
|
||||
logger.error(error_msg)
|
||||
return {
|
||||
'success': False,
|
||||
'account_id': None,
|
||||
'error': error_msg,
|
||||
'message': error_msg
|
||||
}
|
||||
|
||||
logger.info(f"Account in Datenbank gespeichert: {account_record['username']} (ID: {account_id})")
|
||||
|
||||
# Fingerprint für Account generieren
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren