From 0387c6181a04afce9ebb75e8767c9faf94c8735a Mon Sep 17 00:00:00 2001 From: Manjeet Singh Bhatia Date: Wed, 29 Mar 2017 22:21:56 +0000 Subject: [PATCH] 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 --- neutron/db/common_db_mixin.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/neutron/db/common_db_mixin.py b/neutron/db/common_db_mixin.py index 439a79dba9a..5b07f0f6d6a 100644 --- a/neutron/db/common_db_mixin.py +++ b/neutron/db/common_db_mixin.py @@ -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,