Skip to content

Commit

Permalink
Make sure to pass the extra_emails field when cloning a tenant
Browse files Browse the repository at this point in the history
which is the default way of creating new tenants
  • Loading branch information
atodorov committed May 2, 2024
1 parent 3753d88 commit 20c5c98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tcms_tenants/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def test_create_tenant_with_name_schema_publicly_readable_payment_date(self):
tenant = Tenant.objects.get(schema_name="subscriber")
self.assertFalse(tenant.publicly_readable)
self.assertEqual(tenant.paid_until, paid_until)
self.assertEqual(tenant.extra_emails, "-")

# assert tenant owner was added to default groups
with tenant_context(tenant):
Expand Down
2 changes: 2 additions & 0 deletions tcms_tenants/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def create_tenant(form, request):
request.user.pk,
"--organization",
form.cleaned_data["organization"] or "-",
"--extra_emails",
form.cleaned_data["extra_emails"] or "-",
"--domain-domain",
tenant_domain(schema_name),
"--domain-is_primary",
Expand Down

0 comments on commit 20c5c98

Please sign in to comment.