2025-01-24 10:09:12 +01:00
|
|
|
from .instructions_list import BrickInstructionsList
|
|
|
|
from .retired_list import BrickRetiredList
|
2025-01-31 16:34:52 +01:00
|
|
|
from .set_owner_list import BrickSetOwnerList
|
2025-02-04 12:52:18 +01:00
|
|
|
from .set_purchase_location_list import BrickSetPurchaseLocationList
|
2025-01-30 15:03:16 +01:00
|
|
|
from .set_status_list import BrickSetStatusList
|
2025-02-03 16:46:45 +01:00
|
|
|
from .set_storage_list import BrickSetStorageList
|
2025-01-31 18:08:53 +01:00
|
|
|
from .set_tag_list import BrickSetTagList
|
2025-01-24 10:09:12 +01:00
|
|
|
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)
|
|
|
|
|
2025-01-31 16:34:52 +01:00
|
|
|
# Reload the set owners
|
2025-02-03 12:25:42 +01:00
|
|
|
BrickSetOwnerList.new(force=True)
|
2025-01-31 16:34:52 +01:00
|
|
|
|
2025-02-04 12:52:18 +01:00
|
|
|
# Reload the set purchase locations
|
|
|
|
BrickSetPurchaseLocationList.new(force=True)
|
|
|
|
|
2025-01-30 15:03:16 +01:00
|
|
|
# Reload the set statuses
|
2025-02-03 12:25:42 +01:00
|
|
|
BrickSetStatusList.new(force=True)
|
2025-01-24 10:36:24 +01:00
|
|
|
|
2025-02-03 16:46:45 +01:00
|
|
|
# Reload the set storages
|
|
|
|
BrickSetStorageList.new(force=True)
|
|
|
|
|
2025-01-31 18:08:53 +01:00
|
|
|
# Reload the set tags
|
2025-02-03 12:25:42 +01:00
|
|
|
BrickSetTagList.new(force=True)
|
2025-01-31 18:08:53 +01:00
|
|
|
|
2025-01-24 10:09:12 +01:00
|
|
|
# Reload retired sets
|
|
|
|
BrickRetiredList(force=True)
|
|
|
|
|
|
|
|
# Reload themes
|
|
|
|
BrickThemeList(force=True)
|
|
|
|
except Exception:
|
|
|
|
pass
|