providers/saml: fix managed mappings not being set on import
This commit is contained in:
parent
0ade57b5a6
commit
61772b75ff
|
@ -74,7 +74,7 @@ class ServiceProviderMetadata:
|
|||
# Set all auto-generated Property-mappings as defaults
|
||||
# They should provide a sane default for most applications:
|
||||
provider.property_mappings.set(
|
||||
SAMLPropertyMapping.objects.filter(name__startswith="Autogenerated")
|
||||
SAMLPropertyMapping.objects.exclude(managed__isnull=True)
|
||||
)
|
||||
provider.save()
|
||||
return provider
|
||||
|
|
|
@ -78,7 +78,7 @@ class TestServiceProviderMetadataParser(TestCase):
|
|||
self.assertEqual(provider.sp_binding, SAMLBindings.POST)
|
||||
self.assertEqual(
|
||||
len(provider.property_mappings.all()),
|
||||
len(SAMLPropertyMapping.objects.filter(name__startswith="Autogenerated")),
|
||||
len(SAMLPropertyMapping.objects.exclude(managed__isnull=True)),
|
||||
)
|
||||
|
||||
def test_with_signing_cert(self):
|
||||
|
|
Reference in a new issue