-
Notifications
You must be signed in to change notification settings - Fork 163
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
Account for duplicate file sizes and speed up channel list page loading #348
Conversation
if cached_data: | ||
return cached_data | ||
tree_id = self.main_tree.tree_id | ||
files = File.objects.select_related('contentnode').select_related('assessment_item')\ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tree_id = self.main_tree.tree_id | ||
files = File.objects.select_related('contentnode').select_related('assessment_item')\ | ||
.filter(Q(contentnode__tree_id=tree_id) | Q(assessment_item__contentnode__tree_id=tree_id))\ | ||
.values('checksum', 'file_size').distinct().aggregate(resource_size=Sum('file_size')) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@jayoshih Could you give me some steps on how to test this? |
@jonboiser If you upload a file multiple times, does it add the file size multiple times under the following locations? |
Ok, tested it out on both modals, and it looks good. |
No description provided.