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

Use dict key lookup instead of hasattr #196

Merged
merged 1 commit into from
Nov 15, 2020
Merged

Use dict key lookup instead of hasattr #196

merged 1 commit into from
Nov 15, 2020

Conversation

Kamforka
Copy link
Collaborator

PR related to #195

An alert's artifacts cannot be updated using the update_alert method because artifact serialization is skipped due to the incorrect usage of hasattr on the data patch dictionary.
Using the in operator instead to look up the key in the dictionary and trigger the artifact serialization if needed.

@nadouani nadouani linked an issue Nov 15, 2020 that may be closed by this pull request
@nadouani nadouani merged commit e1637f2 into TheHive-Project:1.x Nov 15, 2020
@nadouani
Copy link
Contributor

Thanks @Kamforka, testing the PR.

@nadouani nadouani added this to the 1.8.0 milestone Nov 15, 2020
@Kamforka
Copy link
Collaborator Author

@nadouani thank you for the merge!
Can you please suggest a release date for 1.8.0, so I can remove the monkey patching from my code due to this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error updating alert artifact
3 participants