forked from mirrors/bookwyrm
Use transaction decorator on group accept
This commit is contained in:
parent
08a8f37a0b
commit
73e09f8d18
1 changed files with 20 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue