Removing workaround for bug 1656947

paginate_query was exploding when sort_keys had a
boolean column, since it was fixed in 4.18.0 of
oslo.db. This workaround is no longer needed.

Change-Id: Ie8df9c91c2828bb8886f9b175f06966fe9dd962c
This commit is contained in:
Manjeet Singh Bhatia 2017-03-29 22:21:56 +00:00 committed by Ihar Hrachyshka
parent 8392619190
commit 0387c6181a

View File

@ -220,16 +220,7 @@ class CommonDbMixin(object):
# if model has no unqiue sets, 'paginate_query' will
# warn if sorting is unstable
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):
# 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
break
else:
return kset
return []
return uk_sets[0] if uk_sets else []
def _get_collection(self, context, model, dict_func, filters=None,
fields=None, sorts=None, limit=None, marker_obj=None,