Просмотр исходного кода

fix: 配置文件多了个空格导致的问题

sansan 6 месяцев назад
Родитель
Сommit
a6c899d5d3
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      main.py

+ 3 - 1
main.py

@@ -116,7 +116,9 @@ def load_config():
             else config_data["notification"]
             .get("push_window", {})
             .get("once_per_day", True),
-            "RECORD_RETENTION_DAYS": int(os.environ.get("PUSH_WINDOW_RETENTION_DAYS", "0"))
+            "RECORD_RETENTION_DAYS": int(
+                os.environ.get("PUSH_WINDOW_RETENTION_DAYS", "").strip() or "0"
+            )
             or config_data["notification"]
             .get("push_window", {})
             .get("push_record_retention_days", 7),