-
Notifications
You must be signed in to change notification settings - Fork 147
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
Correction in update_case usage #57
Comments
Hi @npratley, can you take a look to this issue please? Thanks |
Hi @PavanKotikalapudi thanks for the report. I don't fully understand though, the line linked to just creates the case for example purposes, |
Sure. As per current example // Create a new case // Save the new case's ID for later use // Change some attributes of the new case // Update the case the above code would update the title, description and other details though we only need to update tlp, severity and flag. Instead if we can change the method to def update_case(self, case_id, **attributes): or creating a object like this classs ModifiedCase(object):
then we can use current method without modifying thehive.update_case( ModifiedCase( 'SomeCaseID', tlp=1) |
The solution we will implement to make sure the changes will not break the existing tools that use this library, we will add an optional parameter to the
|
Request Type
Bug
Work Environment
Problem Description
Describe the problem/bug as clearly as possible.
The current update_case method take an object which contains case id and other fields that need to be updated.
The line shows that you create a case object which unnecessarily update the defaults of the case.
Steps to Reproduce
try to use the update method to update only a particular field of the case.
Possible Solutions
either change the update_case method parameter to accept case_id and attributes of case to update as **kwargs or create a pojo for the update_case.
The text was updated successfully, but these errors were encountered: