Merge "Add work-around for older oslo.db" into stable/ocata

This commit is contained in:
Jenkins 2017-04-11 07:54:33 +00:00 committed by Gerrit Code Review
commit 08bf51e995
1 changed files with 2 additions and 1 deletions

View File

@ -255,7 +255,8 @@ class CommonDbMixin(object):
uk_sets = sa_utils.get_unique_keys(model)
for kset in uk_sets:
for k in kset:
if marker_obj and isinstance(getattr(marker_obj, k), bool):
if marker_obj and (isinstance(getattr(marker_obj, k), bool)
or getattr(marker_obj, k) is None):
# TODO(kevinbenton): workaround for bug/1656947.
# we can't use boolean cols until that bug is fixed. return
# first entry in uk_sets once that bug is resolved