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

This commit is contained in:
Jenkins 2017-04-11 18:33:22 +00:00 committed by Gerrit Code Review
commit 652bf15b5f
1 changed files with 2 additions and 1 deletions

View File

@ -310,7 +310,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