SQLDocumentStore get_label_count() bug fixed. (#1251)

This commit is contained in:
Ikram Ali 2021-07-03 17:02:44 +05:00 committed by GitHub
parent aaed22304d
commit 04a470f890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -406,7 +406,7 @@ class SQLDocumentStore(BaseDocumentStore):
"""
Return the number of labels in the document store
"""
index = index or self.index
index = index or self.label_index
return self.session.query(LabelORM).filter_by(index=index).count()
def _convert_sql_row_to_document(self, row) -> Document: