Conversation
| queryset = AddOnRun.objects.none() | ||
| lookup_field = "uuid" | ||
| permit_list_expands = ["addon"] | ||
| permit_list_expands = ["addon", "event"] |
There was a problem hiding this comment.
@mitchelljkotler Any thoughts on the performance implications of this change? Probably want to use select_related?
There was a problem hiding this comment.
Would that go on the queryset right above?
There was a problem hiding this comment.
Yes, thanks for catching this @duckduckgrayduck
No, the queryset above is over written in the get_queryset` method. I left a comment in the appropriate spot.
| def get_queryset(self): | ||
| """Only fetch add-on runs viewable to this user""" | ||
| queryset = AddOnRun.objects.get_viewable(self.request.user) | ||
| if is_expanded(self.request, "addon"): |
There was a problem hiding this comment.
@eyeseast - the code would go here - you can do the same check for addon for event
There was a problem hiding this comment.
Had just found that on my own. It's updated now.
| queryset = AddOnRun.objects.none() | ||
| lookup_field = "uuid" | ||
| permit_list_expands = ["addon"] | ||
| permit_list_expands = ["addon", "event"] |
There was a problem hiding this comment.
Yes, thanks for catching this @duckduckgrayduck
No, the queryset above is over written in the get_queryset` method. I left a comment in the appropriate spot.
Closes #363
Precursor to this issue MuckRock/documentcloud-frontend#629