From da2e9ca3ba8661e209035427c8eee29feb04a059 Mon Sep 17 00:00:00 2001 From: Luigi Pellecchia Date: Thu, 12 Sep 2024 10:04:08 +0200 Subject: [PATCH] Sort api by name and library version as default instead of using the id Signed-off-by: Luigi Pellecchia --- api/api.py | 3 ++- changelog.md | 2 ++ pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/api.py b/api/api.py index 5141e14..42a4773 100644 --- a/api/api.py +++ b/api/api.py @@ -7,7 +7,7 @@ import logging import math import shutil -from sqlalchemy import or_ +from sqlalchemy import and_, or_ from sqlalchemy.orm.exc import NoResultFound import sys import urllib @@ -1210,6 +1210,7 @@ def get(self): query = dbi.session.query(ApiModel) query = filter_query(query, args, ApiModel, False) + query = query.order_by(and_(ApiModel.api, ApiModel.library_version)) # Pagination page = 1 diff --git a/changelog.md b/changelog.md index f7c791b..2d7f172 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,8 @@ ## 1.4.x - Api pagination +- Test case gap highlight in case of direct mapping +- By default sort api by name, library_version instead of by id ## 1.3.x diff --git a/pyproject.toml b/pyproject.toml index 8174e37..384635f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "BASIL" -version = "1.4.1" +version = "1.4.2" description = "open source software quality management tool" authors = [ {name = "Luigi Pellecchia", email = "lpellecc@redhat.com"},