*: propertymapping template -> expression

This commit is contained in:
Jens Langhammer
2020-02-17 20:38:14 +01:00
parent bc4b7ef44d
commit 3aa2f1e892
12 changed files with 42 additions and 23 deletions

View File

@ -22,12 +22,12 @@ def create_default_ad_property_mappings(apps: Apps, schema_editor):
"email": "{{ ldap.mail }}",
}
db_alias = schema_editor.connection.alias
for object_field, template in mapping.items():
for object_field, expression in mapping.items():
LDAPPropertyMapping.objects.using(db_alias).get_or_create(
template=template,
expression=expression,
object_field=object_field,
defaults={
"name": f"Autogenerated LDAP Mapping: {template} -> {object_field}"
"name": f"Autogenerated LDAP Mapping: {expression} -> {object_field}"
},
)
@ -36,6 +36,7 @@ class Migration(migrations.Migration):
dependencies = [
("passbook_sources_ldap", "0006_auto_20200216_1116"),
("passbook_core", "0007_auto_20200217_1934"),
]
operations = [