forked from github/plane
fix: add check if the users need to be imported (#716)
This commit is contained in:
parent
f2144c3e89
commit
105428894f
@ -38,6 +38,8 @@ def service_importer(service, importer_id):
|
|||||||
|
|
||||||
users = importer.data.get("users", [])
|
users = importer.data.get("users", [])
|
||||||
|
|
||||||
|
# Check if we need to import users as well
|
||||||
|
if len(users):
|
||||||
# For all invited users create the uers
|
# For all invited users create the uers
|
||||||
new_users = User.objects.bulk_create(
|
new_users = User.objects.bulk_create(
|
||||||
[
|
[
|
||||||
@ -63,7 +65,6 @@ def service_importer(service, importer_id):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Add new users to Workspace and project automatically
|
# Add new users to Workspace and project automatically
|
||||||
WorkspaceMember.objects.bulk_create(
|
WorkspaceMember.objects.bulk_create(
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user