Skip to content

Commit

Permalink
Merge pull request #5 from baikonur-oss/empty-whitelist-bug
Browse files Browse the repository at this point in the history
Fix empty whitelist case
  • Loading branch information
prog893 authored Aug 5, 2019
2 parents 8743801 + 20f9df3 commit be20b5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lambda/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@

LOG_TYPE_FIELD: str = os.environ['LOG_TYPE_FIELD']
LOG_TIMESTAMP_FIELD: str = os.environ['LOG_TIMESTAMP_FIELD']
LOG_TYPE_FIELD_WHITELIST: set = set(str(os.environ['LOG_TYPE_WHITELIST']).split(','))
LOG_TYPE_UNKNOWN_PREFIX: str = os.environ['LOG_TYPE_UNKNOWN_PREFIX']

WHITELIST: str = str(os.environ['LOG_TYPE_WHITELIST'])
if WHITELIST == "":
LOG_TYPE_FIELD_WHITELIST: set = set()
else:
LOG_TYPE_FIELD_WHITELIST: set = set(WHITELIST.split(','))

ELASTICSEARCH_HOST = os.environ['ES_HOST']
INDEX_NAME_PREFIX = os.environ['INDEX_NAME_PREFIX']

Expand Down

0 comments on commit be20b5b

Please sign in to comment.