Spaces:
Sleeping
Sleeping
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 filesCo-Authored-By: Claude (claude-opus-4-5-thinking) <noreply@anthropic.com>
- 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
|
| 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 |
|