-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: filter connections by entity [ENG-2523] #1200
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1360,7 +1360,7 @@ def get_connected_account(self, id: str) -> ConnectedAccountModel: | |||||||||||
return self.client.connected_accounts.get(connection_id=id) | ||||||||||||
|
||||||||||||
def get_connected_accounts(self) -> t.List[ConnectedAccountModel]: | ||||||||||||
return self.client.connected_accounts.get() | ||||||||||||
return self.client.connected_accounts.get(entity_ids=[self.entity_id] if self.entity_id else None) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Passing None for entity_ids parameter may behave differently than omitting it entirely. Consider skipping the parameter when entity_id is None rather than passing None explicitly. Additionally, the change introduces a potential issue where 'entity_ids' could be set to None, which might not be handled by the 'get' method, leading to unexpected behavior. 📝 Committable Code Suggestion
Suggested change
|
||||||||||||
|
||||||||||||
def get_entity(self, id: t.Optional[str] = None) -> Entity: | ||||||||||||
"""Get entity object for given ID.""" | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding docstring to clarify the behavior of entity filtering: