From 2402cfe29d8614779a947b4c87b1642b4c412605 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 5 Jul 2020 23:00:40 +0200 Subject: [PATCH] providers/* use name for __str__ --- passbook/providers/app_gw/models.py | 2 +- passbook/providers/oauth/models.py | 2 +- passbook/providers/oidc/models.py | 2 +- passbook/providers/saml/models.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/passbook/providers/app_gw/models.py b/passbook/providers/app_gw/models.py index b85f759ee..efacbafb9 100644 --- a/passbook/providers/app_gw/models.py +++ b/passbook/providers/app_gw/models.py @@ -37,7 +37,7 @@ class ApplicationGatewayProvider(Provider): ) def __str__(self): - return f"Application Gateway {self.name}" + return self.name class Meta: diff --git a/passbook/providers/oauth/models.py b/passbook/providers/oauth/models.py index 7a42d1d0e..fe0167d98 100644 --- a/passbook/providers/oauth/models.py +++ b/passbook/providers/oauth/models.py @@ -19,7 +19,7 @@ class OAuth2Provider(Provider, AbstractApplication): form = "passbook.providers.oauth.forms.OAuth2ProviderForm" def __str__(self): - return f"OAuth2 Provider {self.name}" + return self.name def html_setup_urls(self, request: HttpRequest) -> Optional[str]: """return template and context modal with URLs for authorize, token, openid-config, etc""" diff --git a/passbook/providers/oidc/models.py b/passbook/providers/oidc/models.py index e0f3feaf0..5774d7201 100644 --- a/passbook/providers/oidc/models.py +++ b/passbook/providers/oidc/models.py @@ -28,7 +28,7 @@ class OpenIDProvider(Provider): return self.oidc_client.name def __str__(self): - return f"OpenID Connect Provider {self.oidc_client.__str__()}" + return self.oidc_client.__str__() def html_setup_urls(self, request: HttpRequest) -> Optional[str]: """return template and context modal with URLs for authorize, token, openid-config, etc""" diff --git a/passbook/providers/saml/models.py b/passbook/providers/saml/models.py index f5a63b6ed..59dfe392a 100644 --- a/passbook/providers/saml/models.py +++ b/passbook/providers/saml/models.py @@ -123,7 +123,7 @@ class SAMLProvider(Provider): return self._processor def __str__(self): - return f"SAML Provider {self.name}" + return self.name def link_download_metadata(self): """Get link to download XML metadata for admin interface"""