jskinner215 commited on
Commit
5e4315c
·
1 Parent(s): b1a798e

Update weaviate_utils.py

Browse files
Files changed (1) hide show
  1. 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
- return client.schema.get_class(class_name)
59
- except weaviate.exceptions.SchemaValidationException:
 
 
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