diff --git a/rhodecode/lib/pagination.py b/rhodecode/lib/pagination.py --- a/rhodecode/lib/pagination.py +++ b/rhodecode/lib/pagination.py @@ -994,7 +994,7 @@ class Page(CustomPager): def __init__(self, collection, page=1, items_per_page=20, item_count=None, url_maker=None, **kwargs): """ - Special type of pager. We intercept collection to wrap it in our custom + Special type of pager. We intercept a collection to wrap it in our custom logic instead of using wrapper_class """ @@ -1011,14 +1011,20 @@ class SqlPage(CustomPager): def __init__(self, collection, page=1, items_per_page=20, item_count=None, url_maker=None, **kwargs): """ - Special type of pager. We intercept collection to wrap it in our custom + Special type of pager. We intercept a collection to wrap it in our custom logic instead of using wrapper_class """ collection = SqlalchemyOrmWrapper(self, collection) - super(SqlPage, self).__init__(collection=collection, page=page, - items_per_page=items_per_page, item_count=item_count, - wrapper_class=None, url_maker=url_maker, **kwargs) + super().__init__( + collection=collection, + page=page, + items_per_page=items_per_page, + item_count=item_count, + wrapper_class=None, + url_maker=url_maker, + **kwargs + ) class RepoCommitsWrapper(object): diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py --- a/rhodecode/model/notification.py +++ b/rhodecode/model/notification.py @@ -192,6 +192,7 @@ class NotificationModel(BaseModel): elif filter_: q = q.filter(Notification.type_.in_(filter_)) + q = q.order_by(Notification.created_on.desc()) return q def mark_read(self, user, notification): diff --git a/rhodecode/tests/vcs_operations/conftest.py b/rhodecode/tests/vcs_operations/conftest.py --- a/rhodecode/tests/vcs_operations/conftest.py +++ b/rhodecode/tests/vcs_operations/conftest.py @@ -54,7 +54,7 @@ GIT_REPO_WITH_GROUP = f'{REPO_GROUP}/{GI log = logging.getLogger(__name__) # Docker image running httpbin... -HTTPBIN_DOMAIN = 'http://httpbin' +HTTPBIN_DOMAIN = 'http://httpbin:9090' HTTPBIN_POST = HTTPBIN_DOMAIN + '/post'