Use transaction decorator on group accept

This commit is contained in:
Mouse Reeve 2021-12-10 12:03:18 -08:00
parent 08a8f37a0b
commit 73e09f8d18

View file

@ -150,10 +150,9 @@ class GroupMemberInvitation(models.Model):
notification_type=notification_type,
)
@transaction.atomic
def accept(self):
"""turn this request into the real deal"""
with transaction.atomic():
GroupMember.from_request(self)
model = apps.get_model("bookwyrm.Notification", require_ready=True)