BrickTracker/bricktracker/reload.py

25 lines
660 B
Python
Raw Normal View History

from .instructions_list import BrickInstructionsList
from .retired_list import BrickRetiredList
2025-01-30 16:23:47 +01:00
from .set_status import BrickSetStatus
from .set_status_list import BrickSetStatusList
from .theme_list import BrickThemeList
# Reload everything related to a database after an operation
def reload() -> None:
# Failsafe
try:
# Reload the instructions
BrickInstructionsList(force=True)
# Reload the set statuses
2025-01-30 16:23:47 +01:00
BrickSetStatusList(BrickSetStatus, force=True)
# Reload retired sets
BrickRetiredList(force=True)
# Reload themes
BrickThemeList(force=True)
except Exception:
pass