-
Notifications
You must be signed in to change notification settings - Fork 12
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
Expose the 'data_hashes' filter on a dataset #453
Conversation
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.
if data_types is not None | ||
else None, | ||
"dataset_access_settings": dataclasses.asdict(self._dataset_access_settings), | ||
"data_hashes": data_hashes, | ||
}, | ||
), | ||
) |
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.
The data_hashes
parameter is directly added to the request payload without any null check. This could potentially send a None
value in the request if data_hashes
is not provided, which might not be handled correctly by the server and could lead to unexpected behavior or errors.
if data_types is not None | |
else None, | |
"dataset_access_settings": dataclasses.asdict(self._dataset_access_settings), | |
"data_hashes": data_hashes, | |
}, | |
), | |
) | |
if data_types is not None | |
else None, | |
"dataset_access_settings": dataclasses.asdict(self._dataset_access_settings), | |
"data_hashes": data_hashes if data_hashes is not None else [], | |
}, | |
), | |
) |
Introduction and Explanation
See https://github.com/encord-team/cord-backend/pull/2686
Summary by CodeRabbit
Release Notes
New Feature
data_hashes
parameter to thelist_data_rows
function in the dataset module. This allows users to filter dataset rows based on a list of individual data unit hashes.