Skip to content
Snippets Groups Projects
Commit 4fc4d559 authored by teplyakov's avatar teplyakov
Browse files

feat: AUTO-3805 Add isinstance check

parent 691fd67d
No related branches found
No related tags found
1 merge request!77feat: AUTO-3805 CollectionProps type
......@@ -47,8 +47,13 @@ def init_collections(
with open(f"{schemes_dir}/{collection_id}.json", "r") as file:
collection_schema = file.read()
props = collections_settings_mapping.get(collection_id) or CollectionProps()
if not isinstance(props, CollectionProps):
raise TypeError("collections_settings_mapping value must be an instance of CollectionProps")
kwargs = {
**collections_settings_mapping.get(collection_id).to_dict(),
**props.to_dict(),
"id": collection_id,
"name": collection_name,
"schema": collection_schema,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment