tenants: fix syntax error in expression for locale

This commit is contained in:
Jens Langhammer 2022-03-03 11:50:46 +00:00
parent 62a939b91d
commit b1fd801ceb
1 changed files with 5 additions and 5 deletions

View File

@ -67,7 +67,7 @@ def create_default_user_settings_flow(apps: Apps, schema_editor: BaseDatabaseSch
"placeholder": """try: "placeholder": """try:
return user.username return user.username
except: except:
return """, return ''""",
"placeholder_expression": True, "placeholder_expression": True,
}, },
) )
@ -80,7 +80,7 @@ except:
"placeholder": """try: "placeholder": """try:
return user.name return user.name
except: except:
return """, return ''""",
"placeholder_expression": True, "placeholder_expression": True,
}, },
) )
@ -93,7 +93,7 @@ except:
"placeholder": """try: "placeholder": """try:
return user.email return user.email
except: except:
return """, return ''""",
"placeholder_expression": True, "placeholder_expression": True,
}, },
) )
@ -104,9 +104,9 @@ except:
"label": "Locale", "label": "Locale",
"type": FieldTypes.AK_LOCALE, "type": FieldTypes.AK_LOCALE,
"placeholder": """try: "placeholder": """try:
return return user.attributes.get("settings", {}).get("locale", "") return user.attributes.get("settings", {}).get("locale", "")
except: except:
return """, return ''""",
"placeholder_expression": True, "placeholder_expression": True,
"required": True, "required": True,
}, },