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

Can we change it to check for empty "" instead of None. Shadowserver api collector. #2477

Closed
sarabesh opened this issue Mar 13, 2024 · 5 comments · Fixed by #2481
Closed
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior component: bots
Milestone

Comments

@sarabesh
Copy link

By default from the intelmq, types is added as "", when we leave it empty though all the JSON conversions. So, I had some time to figure out why my reports were being filtered. Eventually, as a temporary work around I removed the types parameter completely.

@kamil-certat
Copy link
Contributor

Looks like it should be just if not self.types

@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: bots labels Mar 17, 2024
@sebix
Copy link
Member

sebix commented Mar 17, 2024

Yes, that's clearly a bug

@sebix sebix added this to the 3.3.1 milestone Mar 17, 2024
@elsif2
Copy link
Collaborator

elsif2 commented Mar 17, 2024

I believe it should be if self.types.

@elsif2
Copy link
Collaborator

elsif2 commented Mar 17, 2024

All the other parameters are tested with is None so I don't see why types is handled differently.

@sebix
Copy link
Member

sebix commented Mar 17, 2024

Depends on what you check for. If "", False and None should be treated equally, use if self.types, otherwise check for the value explicitly.
"" usually appears when a bot is edited with the manager and should always be handled.

@elsif2 elsif2 linked a pull request Mar 18, 2024 that will close this issue
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.

4 participants