*: remove path-based import from all PropertyMappings

This commit is contained in:
Jens Langhammer 2020-07-20 16:43:30 +02:00
parent c9663a08da
commit 4040eb9619
2 changed files with 8 additions and 2 deletions

View File

@ -147,7 +147,10 @@ class SAMLPropertyMapping(PropertyMapping):
saml_name = models.TextField(verbose_name="SAML Name") saml_name = models.TextField(verbose_name="SAML Name")
friendly_name = models.TextField(default=None, blank=True, null=True) friendly_name = models.TextField(default=None, blank=True, null=True)
form = "passbook.providers.saml.forms.SAMLPropertyMappingForm" def form(self) -> Type[ModelForm]:
from passbook.providers.saml.forms import SAMLPropertyMappingForm
return SAMLPropertyMappingForm
def __str__(self): def __str__(self):
return f"SAML Property Mapping {self.saml_name}" return f"SAML Property Mapping {self.saml_name}"

View File

@ -89,7 +89,10 @@ class LDAPPropertyMapping(PropertyMapping):
object_field = models.TextField() object_field = models.TextField()
form = "passbook.sources.ldap.forms.LDAPPropertyMappingForm" def form(self) -> Type[ModelForm]:
from passbook.sources.ldap.forms import LDAPPropertyMappingForm
return LDAPPropertyMappingForm
def __str__(self): def __str__(self):
return f"LDAP Property Mapping {self.expression} -> {self.object_field}" return f"LDAP Property Mapping {self.expression} -> {self.object_field}"