Spaces:
Building
Building
Update state_orchestrator.py
Browse files- state_orchestrator.py +4 -4
state_orchestrator.py
CHANGED
@@ -380,14 +380,14 @@ class StateOrchestrator:
|
|
380 |
Transition to a new state with validation
|
381 |
"""
|
382 |
try:
|
383 |
-
# Get session context
|
384 |
-
context = self.
|
385 |
if not context:
|
386 |
log(f"❌ Session not found for state transition | session_id={session_id}")
|
387 |
return False
|
388 |
|
389 |
-
# Get current state from context
|
390 |
-
current_state = context.state
|
391 |
|
392 |
# Check if transition is valid
|
393 |
if new_state not in self.VALID_TRANSITIONS.get(current_state, set()):
|
|
|
380 |
Transition to a new state with validation
|
381 |
"""
|
382 |
try:
|
383 |
+
# Get session context (DÜZELTME: _sessions yerine sessions)
|
384 |
+
context = self.sessions.get(session_id)
|
385 |
if not context:
|
386 |
log(f"❌ Session not found for state transition | session_id={session_id}")
|
387 |
return False
|
388 |
|
389 |
+
# Get current state from context
|
390 |
+
current_state = context.state
|
391 |
|
392 |
# Check if transition is valid
|
393 |
if new_state not in self.VALID_TRANSITIONS.get(current_state, set()):
|