Check if state.config is populated before configuring via the update method

This commit is contained in:
sabaimran 2023-07-03 00:10:56 -07:00
parent bf8914d0c8
commit 260272dca2

View file

@ -398,7 +398,8 @@ def update(
logger.info("📬 Search index updated via API")
try:
state.processor_config = configure_processor(state.config.processor)
if state.config and state.config.processor:
state.processor_config = configure_processor(state.config.processor)
except ValueError as e:
logger.error(e)
raise HTTPException(status_code=500, detail=str(e))