t Claude (claude-opus-4-5-thinking) commited on
Commit
e922737
·
1 Parent(s): 32f5035

fix: handle None question_text in classified edit page

Browse files

Co-Authored-By: Claude (claude-opus-4-5-thinking) <noreply@anthropic.com>

Files changed (1) hide show
  1. classifier_routes.py +1 -1
classifier_routes.py CHANGED
@@ -198,7 +198,7 @@ def edit_classified_questions():
198
  questions = []
199
  for q in questions_from_db:
200
  q_dict = dict(q)
201
- plain_text = q_dict['question_text'] # It's already plain text from OCR
202
  q_dict['question_text_plain'] = (plain_text[:100] + '...') if len(plain_text) > 100 else plain_text
203
  questions.append(q_dict)
204
 
 
198
  questions = []
199
  for q in questions_from_db:
200
  q_dict = dict(q)
201
+ plain_text = q_dict.get('question_text') or '' # Handle None
202
  q_dict['question_text_plain'] = (plain_text[:100] + '...') if len(plain_text) > 100 else plain_text
203
  questions.append(q_dict)
204