Deduplicate tables with the same title
This commit is contained in:
parent
8322151661
commit
e49ea9015f
1 changed files with 11 additions and 1 deletions
|
@ -185,7 +185,17 @@ def get_json_schema_object_fields(obj, enforce_title=False, include_parents=Fals
|
|||
"desc": desc,
|
||||
"req_str": "**Required.** " if required else ""
|
||||
})
|
||||
return tables
|
||||
|
||||
titles = set()
|
||||
filtered = []
|
||||
for table in tables:
|
||||
if table.get("title") in titles:
|
||||
continue
|
||||
|
||||
titles.add(table.get("title"))
|
||||
filtered.append(table)
|
||||
|
||||
return filtered
|
||||
|
||||
|
||||
class MatrixUnits(Units):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue