Spaces:
Running
Running
github-actions[bot] commited on
Commit ·
117b749
1
Parent(s): bf8d35c
deploy: backend from 9bbd9a6
Browse files81 unmodified lines82838485868788899091929394959681 unmodified linesif doc.exists:data = doc.to_dict() or {}module_id = topic.topic_idmodule_status = data.get("moduleStatus") or data.get("status") or "unavailable"else:# Fallback: query by topicId fieldquery = modules_ref.where("topicId", "==", topic.topic_id).limit(1).stream()for match in query:data = match.to_dict() or {}module_id = match.idmodule_status = data.get("moduleStatus") or data.get("status") or "unavailable"breakif not module_id or not module_status:81 unmodified lines82838485868788899091929394959697989910010110210310410510610710810911011111281 unmodified linesif doc.exists:data = doc.to_dict() or {}candidate_status = data.get("moduleStatus") or data.get("status") or "unavailable"assigned_to = data.get("assignedTo")is_teacher_uploaded = (data.get("moduleType") == "teacher_uploaded"or candidate_status == "teacher_uploaded")if not (is_teacher_uploaded and assigned_to and assigned_to != uid):module_id = topic.topic_idmodule_status = candidate_statusif not module_id:# Fallback: query by topicId fieldquery = modules_ref.where("topicId", "==", topic.topic_id).stream()for match in query:data = match.to_dict() or {}candidate_status = data.get("moduleStatus") or data.get("status") or "unavailable"assigned_to = data.get("assignedTo")is_teacher_uploaded = (data.get("moduleType") == "teacher_uploaded"or candidate_status == "teacher_uploaded")if is_teacher_uploaded and assigned_to and assigned_to != uid:continuemodule_id = match.idmodule_status = candidate_statusbreakif not module_id or not module_status:
routes/at_risk_resolution.py+21-5