mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-15 04:36:34 +00:00
Merge branch 'main' into production
This commit is contained in:
commit
79fc286ef8
1 changed files with 7 additions and 7 deletions
|
@ -111,13 +111,13 @@ class ManageInviteRequests(View):
|
||||||
invite_request = get_object_or_404(
|
invite_request = get_object_or_404(
|
||||||
models.InviteRequest, id=request.POST.get("invite-request")
|
models.InviteRequest, id=request.POST.get("invite-request")
|
||||||
)
|
)
|
||||||
# allows re-sending invites
|
# only create a new invite if one doesn't exist already (resending)
|
||||||
invite_request.invite, _ = models.SiteInvite.objects.get_or_create(
|
if not invite_request.invite:
|
||||||
use_limit=1,
|
invite_request.invite = models.SiteInvite.objects.create(
|
||||||
user=request.user,
|
use_limit=1,
|
||||||
)
|
user=request.user,
|
||||||
|
)
|
||||||
invite_request.save()
|
invite_request.save()
|
||||||
emailing.invite_email(invite_request)
|
emailing.invite_email(invite_request)
|
||||||
return redirect("settings-invite-requests")
|
return redirect("settings-invite-requests")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue