Die Dateien wurden in mehreren Bereichen des Backend-Systems aktualisiert und hinzugefügt:
1. 'backend/' - 'startup_test.log', 'startup_test2.log' (neue Logdateien) - 'imprint.html', 'legal.html', 'legal_complex.html.backup' (Dateiänderungen) - 'utils/job_queue_system.py', 'utils/utilities
This commit is contained in:
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Hauptanwendung für das 3D-Druck-Management-System
|
||||
|
||||
@ -76,11 +77,12 @@ class SessionManager:
|
||||
return False
|
||||
|
||||
try:
|
||||
from flask import session, request
|
||||
session_id = session.get('session_id')
|
||||
if not session_id:
|
||||
session_id = hashlib.md5(
|
||||
f"{request.remote_addr}_{datetime.now().isoformat()}".encode()
|
||||
).hexdigest()
|
||||
timestamp = datetime.now().isoformat()
|
||||
session_string = f'{request.remote_addr}_{timestamp}'
|
||||
session_id = hashlib.md5(session_string.encode()).hexdigest()
|
||||
session['session_id'] = session_id
|
||||
|
||||
file_path = os.path.join(
|
||||
@ -746,11 +748,34 @@ session_manager.init_app(app)
|
||||
|
||||
@login_manager.user_loader
|
||||
def load_user(user_id):
|
||||
"""Lädt einen Benutzer für Flask-Login"""
|
||||
"""
|
||||
Lädt einen Benutzer für Flask-Login.
|
||||
|
||||
KRITISCHER FIX: Alle User-Attribute vollständig laden VOR expunge(),
|
||||
um Lazy-Loading-Probleme mit theme_preference und anderen Attributen zu vermeiden.
|
||||
"""
|
||||
try:
|
||||
with get_db_session() as db_session:
|
||||
user = db_session.query(User).filter_by(id=int(user_id)).first()
|
||||
if user:
|
||||
# ALLE User-Attribute explizit laden VOR expunge()
|
||||
# Dies verhindert lazy-loading Fehler nach Session-Trennung
|
||||
_ = user.theme_preference
|
||||
_ = user.language_preference
|
||||
_ = user.email_notifications
|
||||
_ = user.browser_notifications
|
||||
_ = user.dashboard_layout
|
||||
_ = user.compact_mode
|
||||
_ = user.show_completed_jobs
|
||||
_ = user.auto_refresh_interval
|
||||
_ = user.auto_logout_timeout
|
||||
_ = user.department
|
||||
_ = user.position
|
||||
_ = user.phone
|
||||
_ = user.bio
|
||||
_ = user.settings
|
||||
|
||||
# Jetzt sicher expunge (alle Daten sind geladen)
|
||||
db_session.expunge(user)
|
||||
return user
|
||||
except Exception as e:
|
||||
@ -1544,26 +1569,26 @@ def api_stats():
|
||||
'details': str(e)
|
||||
}), 500
|
||||
|
||||
# Statische Seiten
|
||||
# Statische Seiten - Weiterleitungen zu Legal Blueprint
|
||||
@app.route("/privacy")
|
||||
def privacy():
|
||||
"""Datenschutzerklärung"""
|
||||
return render_template("privacy.html")
|
||||
"""Datenschutzerklärung - Weiterleitung zum Legal Blueprint"""
|
||||
return redirect(url_for("legal.privacy"))
|
||||
|
||||
@app.route("/terms")
|
||||
def terms():
|
||||
"""Nutzungsbedingungen"""
|
||||
return render_template("terms.html")
|
||||
"""Nutzungsbedingungen - Weiterleitung zum Legal Blueprint"""
|
||||
return redirect(url_for("legal.terms"))
|
||||
|
||||
@app.route("/imprint")
|
||||
def imprint():
|
||||
"""Impressum"""
|
||||
return render_template("imprint.html")
|
||||
"""Impressum - Weiterleitung zum Legal Blueprint"""
|
||||
return redirect(url_for("legal.imprint"))
|
||||
|
||||
@app.route("/legal")
|
||||
def legal():
|
||||
"""Rechtliche Hinweise - Weiterleitung zum Impressum"""
|
||||
return redirect(url_for("imprint"))
|
||||
"""Rechtliche Hinweise - Weiterleitung zum Legal Blueprint"""
|
||||
return redirect(url_for("legal.legal"))
|
||||
|
||||
# ===== FEHLERBEHANDLUNG =====
|
||||
@app.errorhandler(400)
|
||||
|
BIN
backend/backend/database/myp.db
Normal file
BIN
backend/backend/database/myp.db
Normal file
Binary file not shown.
BIN
backend/backups/myp_backup_20250619_232345.zip
Normal file
BIN
backend/backups/myp_backup_20250619_232345.zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
backend/database/backups/system_backup_20250619_232845.zip
Normal file
BIN
backend/database/backups/system_backup_20250619_232845.zip
Normal file
Binary file not shown.
Binary file not shown.
4
backend/final_test.log
Normal file
4
backend/final_test.log
Normal file
@ -0,0 +1,4 @@
|
||||
File "app.py", line 84
|
||||
session_string = f'{request.remote_addr}_{timestamp}'
|
||||
^
|
||||
SyntaxError: invalid syntax
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user