mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: user invitation workflow for self hosted version (#1441)
This commit is contained in:
parent
e4ee6a5bfb
commit
1a72a0dff4
@ -22,6 +22,7 @@ from django.db.models import (
|
|||||||
)
|
)
|
||||||
from django.db.models.functions import ExtractWeek, Cast, ExtractDay
|
from django.db.models.functions import ExtractWeek, Cast, ExtractDay
|
||||||
from django.db.models.fields import DateField
|
from django.db.models.fields import DateField
|
||||||
|
from django.contrib.auth.hashers import make_password
|
||||||
|
|
||||||
# Third party modules
|
# Third party modules
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
@ -318,11 +319,12 @@ class InviteWorkspaceEndpoint(BaseAPIView):
|
|||||||
_ = User.objects.bulk_create(
|
_ = User.objects.bulk_create(
|
||||||
[
|
[
|
||||||
User(
|
User(
|
||||||
email=email.get("email"),
|
username=str(uuid4().hex),
|
||||||
password=str(uuid4().hex),
|
email=invitation.email,
|
||||||
|
password=make_password(uuid4().hex),
|
||||||
is_password_autoset=True,
|
is_password_autoset=True,
|
||||||
)
|
)
|
||||||
for email in emails
|
for invitation in workspace_invitations
|
||||||
],
|
],
|
||||||
batch_size=100,
|
batch_size=100,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user