bugfix
This commit is contained in:
10
helpers.py
10
helpers.py
@@ -1008,11 +1008,11 @@ for line in lines:
|
||||
if result["justification"]: result["justification"] += " " + justification_text
|
||||
else: result["justification"] = justification_text
|
||||
|
||||
if not parsed_branch or not suggested_branch or suggested_branch.lower() in ["k.a.", "n/a"]:
|
||||
logger.error(f"Fehler in evaluate_branche_chatgpt: Konnte 'Branche:' nicht oder nur leer/k.A. aus Antwort parsen: {chat_response[:500]}...")
|
||||
crm_short_branch_for_fallback = "k.A."
|
||||
if crm_branche and isinstance(crm_branche, str) and crm_branche.strip().lower() != "k.a.":
|
||||
crm_short_branch_for_fallback = crm_branche.strip()
|
||||
if not parsed_branch or not suggested_branch or suggested_branch.lower() in ["k.a.", "n/a"]:
|
||||
logger.error(f"Fehler in evaluate_branche_chatgpt: Konnte 'Branche:' nicht oder nur leer/k.A. aus Antwort parsen: {chat_response[:500]}...")
|
||||
crm_short_branch_for_fallback = "k.A."
|
||||
if crm_branche and isinstance(crm_branche, str) and crm_branche.strip().lower() != "k.a.":
|
||||
crm_short_branch_for_fallback = crm_branche.strip()
|
||||
|
||||
return {
|
||||
"branch": crm_short_branch_for_fallback if crm_short_branch_for_fallback.lower() != "k.a." else "FEHLER PARSING",
|
||||
|
||||
Reference in New Issue
Block a user