Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Output bot: SQL syntax error if fields is emty string (default) #2548

Closed
sebix opened this issue Jan 8, 2025 · 0 comments · Fixed by #2549
Closed

SQL Output bot: SQL syntax error if fields is emty string (default) #2548

sebix opened this issue Jan 8, 2025 · 0 comments · Fixed by #2549
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior component: bots

Comments

@sebix
Copy link
Member

sebix commented Jan 8, 2025

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

@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: bots labels Jan 8, 2025
@sebix sebix added this to the 3.3.2 Bugfix release milestone Jan 8, 2025
@sebix sebix self-assigned this Jan 8, 2025
@sebix sebix closed this as completed in 5b6c602 Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: bots
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant