mirror of
https://github.com/django/django.git
synced 2025-10-03 23:34:47 +00:00
Fixed #28222 -- Allowed settable properties in QuerySet.update_or_create()/get_or_create() defaults.
This commit is contained in:
parent
385cf7091e
commit
37ab3c3f9d
5 changed files with 38 additions and 5 deletions
|
@ -828,10 +828,7 @@ class Options:
|
|||
|
||||
@cached_property
|
||||
def _property_names(self):
|
||||
"""
|
||||
Return a set of the names of the properties defined on the model.
|
||||
Internal helper for model initialization.
|
||||
"""
|
||||
"""Return a set of the names of the properties defined on the model."""
|
||||
return frozenset({
|
||||
attr for attr in
|
||||
dir(self.model) if isinstance(getattr(self.model, attr), property)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue