Spaces:
Build error
Build error
Commit
·
5e4315c
1
Parent(s):
b1a798e
Update weaviate_utils.py
Browse files- weaviate_utils.py +6 -2
weaviate_utils.py
CHANGED
@@ -55,6 +55,10 @@ def ingest_data_to_weaviate(client, csv_file, selected_class):
|
|
55 |
|
56 |
def get_class_schema(client, class_name):
|
57 |
try:
|
58 |
-
|
59 |
-
|
|
|
|
|
60 |
return None
|
|
|
|
|
|
55 |
|
56 |
def get_class_schema(client, class_name):
|
57 |
try:
|
58 |
+
schema = client.schema.get()
|
59 |
+
for cls in schema["classes"]:
|
60 |
+
if cls["class"] == class_name:
|
61 |
+
return cls
|
62 |
return None
|
63 |
+
except weaviate.exceptions.SchemaValidationException:
|
64 |
+
return None
|