fix(training): 修复安全培训状态问题!
This commit is contained in:
1 parent
11cef575b4
commit
375e4e371d
6 files changed
+192
-73
No files matched your search
@@ -85,7 +85,7 @@ def _normalize_exam_mode(value: Any) -> str:
|
||||
return text
|
||||
|
||||
|
||||
def _build_default_safety_progress(safety_stage: str) -> dict[str, str]:
|
||||
def _build_default_safety_progress(safety_stage: str) -> dict[str, Any]:
|
||||
"""
|
||||
根据安全培训当前阶段推导三级学习进度。
|
||||
|
||||
@@ -94,7 +94,7 @@ def _build_default_safety_progress(safety_stage: str) -> dict[str, str]:
|
||||
Returns:
|
||||
company、department、team 三个级别的状态快照。
|
||||
"""
|
||||
progress: dict[str, str] = {key: "pending" for key in SAFETY_LEVEL_KEYS}
|
||||
progress: dict[str, Any] = {key: "pending" for key in SAFETY_LEVEL_KEYS}
|
||||
if safety_stage == "company":
|
||||
progress["company"] = "active"
|
||||
return progress
|
||||
@@ -128,7 +128,7 @@ def _normalize_safety_stage(value: Any) -> str:
|
||||
return text
|
||||
|
||||
|
||||
def _normalize_safety_progress(value: Any, safety_stage: str) -> dict[str, str]:
|
||||
def _normalize_safety_progress(value: Any, safety_stage: str) -> dict[str, Any]:
|
||||
"""
|
||||
规范安全培训三级进度对象。
|
||||
|
||||
|
||||
Reference in new issue
Block a user