Skip to content

Commit

Permalink
Merge pull request #5668 from ccnmtl/nikolas-patch-2
Browse files Browse the repository at this point in the history
Remove prefetch_related on collaboration call
  • Loading branch information
nikolas authored Jan 8, 2025
2 parents 3b73c2b + 2f63746 commit 7d76978
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions structuredcollaboration/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,7 @@ def get_children_for_object(self, obj, author=None):
if author and not author.is_anonymous:
queryset = queryset.filter(Q(user=author) | Q(group__user=author))

return queryset.select_related(
'user', 'group', 'policy_record'
).prefetch_related(
'content_object',
'content_object__author',
'content_object__participants',
'content_object__collaboration')
return queryset.select_related('user', 'group', 'policy_record')

def get_top_ancestor(self): # i.e. domain
result = self
Expand Down

0 comments on commit 7d76978

Please sign in to comment.