user_renewal_notice command will use concatenated company_name in case an auth has multiple partners.
@@ -4,7 +4,7 @@ from django.core.management.base import BaseCommand
from django.urls import reverse
from TWLight.users.signals import Notice
-from TWLight.users.models import Authorization
+from TWLight.users.models import Authorization, get_company_name
class Command(BaseCommand):
@@ -27,7 +27,7 @@ class Command(BaseCommand):
user_wp_username=authorization_object.user.editor.wp_username,
user_email=authorization_object.user.email,
user_lang=authorization_object.user.userprofile.lang,
- partner_name=authorization_object.partners.first().company_name,
+ partner_name=get_company_name(authorization_object),
partner_link=reverse("users:my_library"),
)
