You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: Handle None Values Correctly in List Task Endpoint Query Filter #177
When building the query filter with potential None values for name_prefix and user_id, the filter should be adjusted accordingly to avoid incorrect queries.
Expected Behavior:
If name_prefix is None, filter_dict should be empty ({}).
If user_id is None, it should not be added to the filter.
Actual Behavior:
Currently, if name_prefix is None, the filter becomes: filter_dict = {'task_original.name': {'$regex': '^None'}}
while in the case of None Type the filter_dict should be empty like filter_dict = {}
The actual issue is here:
name_prefix: str = str(kwargs.get("name_prefix"))
if name_prefix is not None:
filter_dict["task_original.name"] = {"$regex": f"^{name_prefix}"}
changed the title [-]fix: Handle None Values Correctly in Get Task Endpoint Query Filter[/-][+]fix: Handle None Values Correctly in List Task Endpoint Query Filter[/+]on Jun 12, 2024
Activity
[-]fix: Handle None Values Correctly in Get Task Endpoint Query Filter[/-][+]fix: Handle None Values Correctly in List Task Endpoint Query Filter[/+]