Kshitijk20 commited on
Commit
26c75ce
·
1 Parent(s): 7c8d332

fixed allowed table error

Browse files
Files changed (1) hide show
  1. app/api/v1/endpoints/schema.py +2 -1
app/api/v1/endpoints/schema.py CHANGED
@@ -55,7 +55,8 @@ async def update_indexing(request: TableIndexingRequest):
55
  )
56
  try:
57
  # Assuming sql_agent has a method to update indexing for tables
58
- sql_agent.allowed_tables = request.allowed_tables
 
59
  return {"message": "Indexing updated successfully for the specified tables."}
60
  except Exception as e:
61
  raise HTTPException(
 
55
  )
56
  try:
57
  # Assuming sql_agent has a method to update indexing for tables
58
+ sql_agent.allowed_tables = request.table_names
59
+ sql_agent.db.allowed_tables = request.table_names # Update the allowed tables in the database connection
60
  return {"message": "Indexing updated successfully for the specified tables."}
61
  except Exception as e:
62
  raise HTTPException(