Add functionality to clear blacklisted music videos in GroupClearBlacklistView and update group detail template

This commit is contained in:
Edgar P. Burkhart 2025-06-13 23:24:21 +02:00
parent c55861c439
commit e64bb8b95a
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 15 additions and 0 deletions

View file

@ -246,3 +246,12 @@ class YoutubeCallbackView(LoginRequiredMixin, View):
},
)
return redirect("/")
class GroupClearBlacklistView(OwnerFilterMixin, SingleObjectMixin, View):
model = models.Group
def get(self, request, pk):
group = self.get_object()
group.musicvideo_set.filter(blacklisted=True).update(blacklisted=False)
return redirect(group)