loosen reconfigure check
This commit is contained in:
parent
ff3d495372
commit
e3353bb0f8
1 changed files with 3 additions and 6 deletions
|
|
@ -424,13 +424,10 @@ async def onboarding(request, flows_service):
|
||||||
# Get current configuration
|
# Get current configuration
|
||||||
current_config = get_openrag_config()
|
current_config = get_openrag_config()
|
||||||
|
|
||||||
# Check if config is NOT marked as edited (only allow onboarding if not yet configured)
|
# Warn if config was already edited (onboarding being re-run)
|
||||||
if current_config.edited:
|
if current_config.edited:
|
||||||
return JSONResponse(
|
logger.warning(
|
||||||
{
|
"Onboarding is being run although configuration was already edited before"
|
||||||
"error": "Configuration has already been edited. Use /settings endpoint for updates."
|
|
||||||
},
|
|
||||||
status_code=403,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Parse request body
|
# Parse request body
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue