forked from github/plane
fix: import user invite emails (#986)
This commit is contained in:
parent
483c49d0ff
commit
1d22817ede
@ -59,7 +59,9 @@ def service_importer(service, importer_id):
|
||||
|
||||
[
|
||||
send_welcome_email.delay(
|
||||
user, True, f"{user.email} was imported to Plane from {service}"
|
||||
str(user.id),
|
||||
True,
|
||||
f"{user.email} was imported to Plane from {service}",
|
||||
)
|
||||
for user in new_users
|
||||
]
|
||||
|
@ -10,9 +10,15 @@ from sentry_sdk import capture_exception
|
||||
from slack_sdk import WebClient
|
||||
from slack_sdk.errors import SlackApiError
|
||||
|
||||
# Module imports
|
||||
from plane.db.models import User
|
||||
|
||||
|
||||
@shared_task
|
||||
def send_welcome_email(instance, created, message):
|
||||
def send_welcome_email(user_id, created, message):
|
||||
try:
|
||||
instance = User.objects.get(pk=user_id)
|
||||
|
||||
if created and not instance.is_bot:
|
||||
first_name = instance.first_name.capitalize()
|
||||
to_email = instance.email
|
||||
|
Loading…
Reference in New Issue
Block a user