-
Notifications
You must be signed in to change notification settings - Fork 0
fix: #91 adding filter by attributes #95
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: #91 adding filter by attributes #95
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.
This implementation is not compliant with the format requested in the ticket for grouping the filter attributes.
| def get(self): | ||
| """List all customers""" | ||
| return customer_dao.get_all() | ||
| return customer_dao.get_all(conditions=request.args) |
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.
What if you have some query like this?
/activities?a=1&b=2&pageSize=0&orders["start_date"]="DESC"&limit=1
This is not going to work, because a and b are the attributes but you are filtering for whatever it is specified in the request arguments.
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.
In addition, it would be nice to filter per namespace that the attributes you want to filter by are valid.
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.
Good catch
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.
What if you have some query like this?
/activities?a=1&b=2&pageSize=0&orders["start_date"]="DESC"&limit=1This is not going to work, because
aandbare the attributes but you are filtering for whatever it is specified in the request arguments.
Do we have filtering and sorting arguments right now?
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 repository has sorting capabilities right now. For instance, The repository for time entries orders the results by start_date. We could do this dynamically in the future.
|
Also, please rename the commit message.
This will increase the version with a minor update. |
6f0a906 to
beb8c84
Compare
a4b6cb8 to
7f8b00d
Compare
7f8b00d to
44a4260
Compare
fix: #91 adding filter by attributes