This commit is contained in:
Hpar 2023-10-10 11:31:10 -06:00 committed by GitHub
commit fae23e6258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -401,7 +401,13 @@ class ServerEnvMixin(models.AbstractModel):
base_field_cls = base_field.__class__
field_args = base_field.args.copy()
field_args.pop("_sequence", None)
field_args.update({"sparse": "server_env_defaults", "automatic": True})
field_args.update(
{
"sparse": "server_env_defaults",
"automatic": True,
"default": base_field.default,
}
)
if hasattr(base_field, "selection"):
field_args["selection"] = base_field.selection