-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fixed category labels not being populated #3778
Conversation
I think this PR look good but the feature over all is not useful it its current state. See #3269 I do not think category filtering active on OTF live? |
@frjo Ah that issue is new to me. It works on live with categories that have lower numbers of submissions but I am seeing that |
Looking at the Traceback, the |
Returns: | ||
A representation of the label | ||
""" | ||
return str(Option.objects.get(id=label_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.
This looks good, but would generally suggest dealing with it in view.py code itself, that way it's easier to fetch all the category names once, instead of here it will 5 db calls if there are 5 categories selected, just to get the names of all the 5 categories.
I generally see template tags causing hidden db queries.
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.
Makes sense! I was actually trying to figure out if I could cache the result of the initial query somehow but popping the login into view.py
might make things easier.
@theskumar Would be really nice if you can improve the performance of the category query. I can see how this filter can be useful for staff. |
that last push should be a lot more efficient ^ |
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.
💯
Fixes #3741. Adds a new tag to get the label of the category from the ID
Fixes #3741. Adds a new tag to get the label of the category from the ID
Fixes HyphaApp#3741. Adds a new tag to get the label of the category from the ID
Description
Fixes #3741. Adds a new tag to get the label of the category from the ID
Test Steps