﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36573	"""fields.E010"" should not warn when field defaults are expressions"	Clifford Gama	Clifford Gama	"The [https://github.com/django/django/blob/3e7aedfb2eb37d0c83ce3ce936f1b89eb5451dfa/django/db/models/fields/mixins.py#L40 CheckFieldDefaultMixin._check_default()] system check (fields.E010) currently warns whenever a field’s default is not None, and not callable. This is meant to prevent accidental sharing of mutable Python objects such as `[]` or `{}` across all model instances, however this also guards against expressions.

For example, it warns against using `data = models.JSONField(default=Value({""key"": ""value""}, JSONField()))` and has been warning for `Value(None, JSONField())`. This seems unnecessary, because (unless I’m missing something) expressions are not subject to the mutability/sharing problem that the check is meant to prevent."	Cleanup/optimization	closed	Core (System checks)	dev	Normal	duplicate	expression, default	Sage Abdullah	Unreviewed	1	0	0	0	0	0
