Skip to content

Commit

Permalink
Update loaders.py
Browse files Browse the repository at this point in the history
  • Loading branch information
luffynextgen authored Nov 15, 2023
1 parent 89bdaa4 commit 9701674
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elastalert/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ def load_options(self, rule, conf, filename, args=None):
if 'kibana_discover_to_timedelta' in rule:
rule['kibana_discover_to_timedelta'] = datetime.timedelta(**rule['kibana_discover_to_timedelta'])
if 'opensearch_discover_from_timedelta' in rule:
rule['opensearch_discover_from_timedelta'] = datetime.timedelta(**rule['kibana_discover_from_timedelta'])
rule['opensearch_discover_from_timedelta'] = datetime.timedelta(**rule['opensearch_discover_from_timedelta'])
if 'opensearch_discover_to_timedelta' in rule:
rule['opensearch_discover_to_timedelta'] = datetime.timedelta(**rule['kibana_discover_to_timedelta'])
rule['opensearch_discover_to_timedelta'] = datetime.timedelta(**rule['opensearch_discover_to_timedelta'])
except (KeyError, TypeError) as e:
raise EAException('Invalid time format used: %s' % e)

Expand Down

0 comments on commit 9701674

Please sign in to comment.