Skip to content

Commit

Permalink
Merge pull request #4401 from GarvitSinghal47/error-channel-collection
Browse files Browse the repository at this point in the history
admin-panel collection error resolved
  • Loading branch information
ozer550 authored Feb 6, 2024
2 parents 9180549 + 0d5a44a commit 54e82e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contentcuration/contentcuration/viewsets/channelset.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def get_queryset(self):
queryset = super(ChannelSetViewSet, self).get_queryset()
user_id = not self.request.user.is_anonymous and self.request.user.id
edit = Exists(User.channel_sets.through.objects.filter(user_id=user_id, channelset_id=OuterRef("id")))
return queryset.annotate(edit=edit)
queryset = queryset.annotate(edit=edit).filter(edit=True)
return queryset

def annotate_queryset(self, queryset):
return queryset.annotate(
Expand Down

0 comments on commit 54e82e7

Please sign in to comment.