From 582b3b311ea6973a0b2e9c31067b422a5dc4a644 Mon Sep 17 00:00:00 2001 From: Tim DiLauro Date: Fri, 8 Mar 2024 16:59:08 -0500 Subject: [PATCH] Initialize CachedData cache for `distributor` customlist searches. (#1715) --- bin/custom_list_update_new_entries | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/custom_list_update_new_entries b/bin/custom_list_update_new_entries index 054f9485b6..8a2812906d 100755 --- a/bin/custom_list_update_new_entries +++ b/bin/custom_list_update_new_entries @@ -8,6 +8,11 @@ import sys bin_dir = os.path.split(__file__)[0] package_dir = os.path.join(bin_dir, "..") sys.path.append(os.path.abspath(package_dir)) + +from core.model import production_session from core.scripts import CustomListUpdateEntriesScript +from core.util.cache import CachedData +# The cache needs to be initialized for this script to work properly. +CachedData.initialize(production_session(initialize_data=False)) CustomListUpdateEntriesScript().run()