mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-03 08:41:35 -07:00
sleeping devices status #1519
This commit is contained in:
@@ -11,6 +11,7 @@ import uuid
|
||||
# Register NetAlertX libraries
|
||||
import conf
|
||||
from const import fullConfPath, fullConfFolder, default_tz, applicationPath
|
||||
from db.db_upgrade import ensure_views
|
||||
from helper import getBuildTimeStampAndVersion, collect_lang_strings, updateSubnets, generate_random_string
|
||||
from utils.datetime_utils import timeNowUTC
|
||||
from app_state import updateState
|
||||
@@ -733,6 +734,12 @@ def importConfigs(pm, db, all_plugins):
|
||||
|
||||
db.commitDB()
|
||||
|
||||
# Rebuild DevicesView now that settings (including NTFPRCS_sleep_time) are committed.
|
||||
# This is the single call site — initDB() deliberately skips it so the view
|
||||
# always gets the real user value, not an empty-Settings fallback.
|
||||
ensure_views(sql)
|
||||
db.commitDB()
|
||||
|
||||
# update only the settings datasource
|
||||
update_api(db, all_plugins, True, ["settings"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user