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

Fix documentation mismatch on api.find_first TheHive-Project/TheHive4py#165 #166

Merged
merged 2 commits into from
Nov 23, 2020
Merged

Fix documentation mismatch on api.find_first TheHive-Project/TheHive4py#165 #166

merged 2 commits into from
Nov 23, 2020

Conversation

haam3r
Copy link

@haam3r haam3r commented Jun 15, 2020

Fixes: #165

  1. This PR changes the api.find_first function to return a requests.Response object instead of a Python dict as it should be according to the docstrings.
  2. Additionally, the previous behaviour was to still query for either all cases matching the query or a user specified range and then return only the first element from the requests.Response object.
    This PR changes the logic by overwriting the range parameter to 0-1 which means we actually ask The Hive to only provide one case.
  3. Removed the range parameter from the docstrings Arguments list, since we now set it statically.

@nadouani
Copy link
Contributor

Hello @haam3r thanks for the PR, the issue here is that this breaks compatibility.

The original find_first is bad. Updating is that way breaks compatibility.

We need to be careful about it.

@haam3r
Copy link
Author

haam3r commented Jun 18, 2020

Okay, that's understandable. Would you like me to change the PR in some way?

@nadouani nadouani added this to the 1.8.0 milestone Nov 23, 2020
@nadouani nadouani merged commit 7c4bf7b into TheHive-Project:1.x Nov 23, 2020
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.

Documentation mismatch on function return
2 participants