forked from mirrors/bookwyrm
accepting membership fixes
- don't delete the invitation twice - send membership information properly to notification
This commit is contained in:
parent
9290655116
commit
89dea44614
1 changed files with 2 additions and 2 deletions
|
@ -132,11 +132,11 @@ class GroupMemberInvitation(models.Model):
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
BookwyrmGroupMember.from_request(self)
|
BookwyrmGroupMember.from_request(self)
|
||||||
self.delete()
|
|
||||||
|
|
||||||
# let the other members know about it
|
# let the other members know about it
|
||||||
model = apps.get_model("bookwyrm.Notification", require_ready=True)
|
model = apps.get_model("bookwyrm.Notification", require_ready=True)
|
||||||
for member in self.group.members.all:
|
for membership in self.group.memberships.all():
|
||||||
|
member = membership.user
|
||||||
if member != self.user:
|
if member != self.user:
|
||||||
model.objects.create(
|
model.objects.create(
|
||||||
user=member,
|
user=member,
|
||||||
|
|
Loading…
Reference in a new issue