Skip to content

Commit

Permalink
add/delete by type should return response (#429)
Browse files Browse the repository at this point in the history
* add/delete by type should return response

* changelog
  • Loading branch information
timabrmsn committed May 23, 2022
1 parent 429bd31 commit 6585324
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ how a consumer would use the library (e.g. adding unit tests, updating documenta
- `securitydata.savedsearches.execute()`
- `securitydata.savedsearches.search_file_events()`

### Fixed

- A bug where `sdk.watchlists.add_included_users_by_watchlist_type()` and `sdk.watchlists.delete_included_users_by_watchlist_type()` were not returning the response object.

## 1.23.0 - 2022-05-12

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/py42/services/watchlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def add_included_users_by_watchlist_type(self, user_ids, watchlist_type):
except KeyError:
# if watchlist of specified type not found, create watchlist
id = (self.create(watchlist_type)).data["watchlistId"]
self.add_included_users_by_watchlist_id(user_ids, id)
return self.add_included_users_by_watchlist_id(user_ids, id)

def delete_included_users_by_watchlist_id(self, user_ids, watchlist_id):
if not isinstance(user_ids, (list, tuple)):
Expand All @@ -127,7 +127,7 @@ def delete_included_users_by_watchlist_type(self, user_ids, watchlist_type):
except KeyError:
# if specified watchlist type not found, raise error
raise Py42Error(f"Couldn't find watchlist of type:'{watchlist_type}'.")
self.delete_included_users_by_watchlist_id(user_ids, id)
return self.delete_included_users_by_watchlist_id(user_ids, id)

def get_page_watchlist_members(self, watchlist_id, page_num=1, page_size=None):
data = {
Expand Down

0 comments on commit 6585324

Please sign in to comment.