Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianloose committed Nov 19, 2024
1 parent 7b1fd7d commit cbf9d0f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions app/vector_database/lecture_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ def init_lecture_schema(client: WeaviateClient) -> Collection:
"""
if client.collections.exists(LectureSchema.COLLECTION_NAME.value):
collection = client.collections.get(LectureSchema.COLLECTION_NAME.value)
if not any((property.name == "course_language") for property in collection.config.get(simple=False).properties):
if not any(
(property.name == "course_language")
for property in collection.config.get(simple=False).properties
):
collection.config.add_property(
Property(
name=LectureSchema.COURSE_LANGUAGE.value,
description="The language of the COURSE",
data_type=DataType.TEXT,
index_searchable=False,
)
Property(
name=LectureSchema.COURSE_LANGUAGE.value,
description="The language of the COURSE",
data_type=DataType.TEXT,
index_searchable=False,
)
)

return collection
Expand Down

0 comments on commit cbf9d0f

Please sign in to comment.