fix(mode): timeframe value should not be null (#2312)
The graylog API consider requests with undef parameters values as 0. So we'd better ensure that the timeframe value is valid when the option is set
This commit is contained in:
parent
9c65da1e92
commit
9a6a5c92a8
|
@ -65,6 +65,11 @@ sub check_options {
|
|||
$self->{output}->add_option_msg(short_msg => 'Please set --query option.');
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
|
||||
if (defined($self->{option_results}->{timeframe}) && $self->{option_results}->{timeframe} eq '') {
|
||||
$self->{output}->add_option_msg(short_msg => 'Please set --timeframe value.');
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
}
|
||||
|
||||
sub manage_selection {
|
||||
|
|
Loading…
Reference in New Issue