|
|
@ -23,10 +23,9 @@ def get_changable_attribute_names(model: Type[db.Model]) -> Set[str]: |
|
|
|
if class_name in _changable_attribute_names: |
|
|
|
return _changable_attribute_names[class_name] |
|
|
|
|
|
|
|
model_attributes = set([prop.key for prop in |
|
|
|
orm.class_mapper( |
|
|
|
model.__class__).iterate_properties |
|
|
|
if isinstance(prop, orm.ColumnProperty)]) |
|
|
|
model_attributes = {prop.key for prop in |
|
|
|
orm.class_mapper(model.__class__).iterate_properties |
|
|
|
if isinstance(prop, orm.ColumnProperty)} |
|
|
|
_changable_attribute_names[class_name] = model_attributes |
|
|
|
return model_attributes |
|
|
|
|
|
|
|