mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-05 14:58:43 +00:00
remove group-curated lists when user leaves group
This commit is contained in:
parent
a179de33bc
commit
1c5789f283
1 changed files with 3 additions and 0 deletions
|
@ -189,6 +189,9 @@ def remove_member(request):
|
|||
membership = models.GroupMember.objects.get(group=group,user=user)
|
||||
membership.delete()
|
||||
|
||||
# remove this user's group-curated lists from the group
|
||||
models.List.objects.filter(group=group,user=user).update(group=None,curation="closed")
|
||||
|
||||
except IntegrityError:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue