mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 13:16:33 +00:00
remove user and their lists from group when group.user blocks them
Lists are changed to closed curation with no group.
This commit is contained in:
parent
9940abfd81
commit
b3cc9e5b75
1 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,10 @@ class Block(View):
|
|||
models.UserBlocks.objects.create(
|
||||
user_subject=request.user, user_object=to_block
|
||||
)
|
||||
# remove the blocked users's lists from the groups
|
||||
models.List.remove_from_group(request.user, to_block)
|
||||
# remove the blocked user from all blocker's owned groups
|
||||
models.GroupMember.remove(request.user, to_block)
|
||||
return redirect("prefs-block")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue