[IMP] Server env default fields string

Not all fields have their string in the args, but '.string' returns the computed (based on field name) string if not set in the args.
This commit is contained in:
Quentin Groulard 2023-06-19 13:26:11 +02:00
parent a652e1690e
commit 778029822a
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ class ServerEnvMixin(models.AbstractModel):
base_field_cls = base_field.__class__
field_args = base_field.args.copy() if base_field.args else {}
field_args.pop("_sequence", None)
fieldlabel = "{} {}".format(field_args.get("string", ""), "Env Default")
fieldlabel = "{} {}".format(base_field.string or "", "Env Default")
field_args.update(
{
"sparse": "server_env_defaults",