Skip to content

Commit 4fd7180

Browse files
committed
Remove jumping over NewTenantView class
because this could lead to problems in the future if this class changes
1 parent 5d106bb commit 4fd7180

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tcms_github_marketplace/views.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,10 @@ class CreateTenant(NewTenantView):
343343

344344
def dispatch(self, request, *args, **kwargs):
345345
"""
346-
Jump over NewTenantView class b/c it requires the tcms_tenants.add_tenant
346+
NewTenantView class requires the ``tcms_tenants.add_tenant``
347347
permission while on Marketplace we allow everyone who had paid their subscription
348-
to create tenants!
348+
to create tenants! Because of this simulate that they have permission to
349+
create a tenant!
349350
"""
350351
# we take the most recent purchase event for this user
351352
# where they purchase a paid plan
@@ -364,9 +365,7 @@ def dispatch(self, request, *args, **kwargs):
364365
if not self.organization:
365366
self.organization = utils.organization_from_purchase(self.purchase)
366367

367-
return super(NewTenantView, self).dispatch( # pylint: disable=bad-super-call
368-
request, *args, **kwargs
369-
)
368+
return super().dispatch(request, *args, **kwargs)
370369

371370
def check(self, request):
372371
"""

0 commit comments

Comments
 (0)