summaryrefslogtreecommitdiff
path: root/examples/versioning/history_meta.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/versioning/history_meta.py')
-rw-r--r--examples/versioning/history_meta.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/versioning/history_meta.py b/examples/versioning/history_meta.py
index c2b283f1a..0a631e849 100644
--- a/examples/versioning/history_meta.py
+++ b/examples/versioning/history_meta.py
@@ -123,7 +123,7 @@ def create_version(obj, session, deleted = False):
# mapped column. this will allow usage of MapperProperties
# that have a different keyname than that of the mapped column.
try:
- prop = obj_mapper._get_col_to_prop(obj_col)
+ prop = obj_mapper.get_property_by_column(obj_col)
except UnmappedColumnError:
# in the case of single table inheritance, there may be
# columns on the mapped table intended for the subclass only.
@@ -144,7 +144,9 @@ def create_version(obj, session, deleted = False):
elif u:
attr[hist_col.key] = u[0]
else:
- raise Exception("TODO: what makes us arrive here ?")
+ # if the attribute had no value.
+ attr[hist_col.key] = a[0]
+ obj_changed = True
if not obj_changed and not deleted:
return