feat: 增加公告栏并让用户自选学时判断
This commit is contained in:
@@ -172,6 +172,7 @@ def test_login_stores_password_and_credential_only(monkeypatch) -> None:
|
||||
"study_opened_at",
|
||||
"study_schedule_enabled",
|
||||
"heartbeat_mode",
|
||||
"hours_source",
|
||||
"heartbeat_video_seconds",
|
||||
"heartbeat_document_seconds",
|
||||
"heartbeat_scorm_seconds",
|
||||
@@ -593,7 +594,7 @@ def test_period_page_is_not_fetched_twice() -> None:
|
||||
return Response()
|
||||
|
||||
client.client = HTTP()
|
||||
assert client._period_minutes() == {"year": "34", "month": "12"}
|
||||
assert client._period_minutes() == {"year": "34", "month": "12", "total": ""}
|
||||
assert len(calls) == 1
|
||||
|
||||
|
||||
@@ -1108,6 +1109,9 @@ def _set_hours_source(value: str) -> None:
|
||||
with SessionLocal() as db:
|
||||
row = load_config(db)
|
||||
row.hours_source = value
|
||||
account = db.get(Account, "6650000146")
|
||||
if account is not None:
|
||||
account.hours_source = value
|
||||
db.commit()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user