fix job relaunch error

AttributeError: 'Settings' object has no attribute 'INSTALL_UUID'
This commit is contained in:
Hao Liu 2023-03-07 19:03:40 -05:00
parent 7cef4e6db7
commit 049fb4eff5

View File

@ -187,7 +187,7 @@ def get_settings_to_cache(registry):
def _get_setting_from_db(registry, key):
def wrapped(registry, key):
field = registry.get_setting_field(key)
if not field.read_only:
if not field.read_only or key == 'INSTALL_UUID':
return Setting.objects.filter(key=key, user__isnull=True).order_by('pk').first()
with ThreadPoolExecutor(max_workers=1) as executor: