Fix ES issue with capital letters in index name

This commit is contained in:
allegroai 2022-05-18 10:16:19 +03:00
parent 4941ac70e0
commit 5f8ef808a3

View File

@ -41,7 +41,7 @@ class EventSettings:
def get_index_name(company_id: str, event_type: str):
event_type = event_type.lower().replace(" ", "_")
return f"events-{event_type}-{company_id}"
return f"events-{event_type}-{company_id.lower()}"
def check_empty_data(es: Elasticsearch, company_id: str, event_type: EventType) -> bool: