Fixed #28222 -- Allowed settable properties in QuerySet.update_or_create()/get_or_create() defaults.

This commit is contained in:
Alex 2017-05-19 06:40:43 -04:00 committed by Tim Graham
parent 385cf7091e
commit 37ab3c3f9d
5 changed files with 38 additions and 5 deletions

View file

@ -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)