Skip to content

Commit

Permalink
fix: reapply addition of tables indexation
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna committed Aug 16, 2023
1 parent f4893f3 commit 4a6443c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions basedosdados_api/api/v1/search_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ def prepare(self, obj):
table_ids = data.get("table_slugs", [])
if table_ids:
data["tables"] = []
for i in range(len(table_ids)):
data["tables"].append(
{
"id": data.get("table_ids", [])[i],
"name": data.get("table_names", [])[i],
"slug": data.get("table_slugs", [])[i],
"is_closed": data.get("table_is_closed", [])[i],
}
)
data["total_tables"] = len(table_ids)
else:
data["total_tables"] = 0
Expand Down

0 comments on commit 4a6443c

Please sign in to comment.