From e270bca53cb07d2fd57f5ccee0888157e801e099 Mon Sep 17 00:00:00 2001 From: Dawn Pattison Date: Thu, 16 Jun 2022 14:28:05 -0500 Subject: [PATCH 1/2] Sort by connection name ascending. --- src/fidesops/api/v1/endpoints/connection_endpoints.py | 2 +- tests/api/v1/endpoints/test_connection_config_endpoints.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fidesops/api/v1/endpoints/connection_endpoints.py b/src/fidesops/api/v1/endpoints/connection_endpoints.py index 627eb96ab..8a123443b 100644 --- a/src/fidesops/api/v1/endpoints/connection_endpoints.py +++ b/src/fidesops/api/v1/endpoints/connection_endpoints.py @@ -103,7 +103,7 @@ def get_connections( ) ) return paginate( - query.order_by(ConnectionConfig.created_at.desc()), + query.order_by(ConnectionConfig.name.asc()), params=params, ) diff --git a/tests/api/v1/endpoints/test_connection_config_endpoints.py b/tests/api/v1/endpoints/test_connection_config_endpoints.py index e646b2d38..ede799583 100644 --- a/tests/api/v1/endpoints/test_connection_config_endpoints.py +++ b/tests/api/v1/endpoints/test_connection_config_endpoints.py @@ -7,7 +7,6 @@ from fastapi import HTTPException from fastapi_pagination import Params from sqlalchemy.orm import Session -from sqlalchemy.testing import db from starlette.testclient import TestClient from fidesops.api.v1.scope_registry import ( @@ -470,7 +469,7 @@ def test_search_connections( [read_connection_config.key, connection_config.key] ) ) - .order_by(ConnectionConfig.created_at.desc()) + .order_by(ConnectionConfig.name.asc()) .all() ) assert len(ordered) == 2 From cd44e51ab25c92521f6f7cdc4e06083f68aaf3ef Mon Sep 17 00:00:00 2001 From: Dawn Pattison Date: Thu, 16 Jun 2022 14:43:22 -0500 Subject: [PATCH 2/2] Update changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4953297..35350f33e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ The types of changes are: * Bumped mypy to version 0.961 [#630](https://github.com/ethyca/fidesops/pull/630) * Bumped Python to version 3.9.13 in the `Dockerfile` [#630](https://github.com/ethyca/fidesops/pull/630) * Matched the path to the migrations in the mypy settings with the new location [#634](https://github.com/ethyca/fidesops/pull/634) +* Sort ConnectionConfig by name ascending [#668](https://github.com/ethyca/fidesops/pull/672) ### Developer Experience