By default the parameter "fields" is empty. An empty string.
The code treats this a value and uses it to generate the field name list:
|
key_names = self.fields |
|
if key_names is None: |
|
key_names = event.keys() |
|
valid_keys = [key for key in key_names if key in event] |
Instead, empty string should be treated the same as none/null