Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Sort ConnectionConfig Name Ascending [#668] (#672)
Browse files Browse the repository at this point in the history
* Sort by connection name ascending.

* Update changelog.
  • Loading branch information
pattisdr authored Jun 16, 2022
1 parent 2955601 commit 4e8f0a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,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

Expand Down
2 changes: 1 addition & 1 deletion src/fidesops/api/v1/endpoints/connection_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_connections(
)
)
return paginate(
query.order_by(ConnectionConfig.created_at.desc()),
query.order_by(ConnectionConfig.name.asc()),
params=params,
)

Expand Down
3 changes: 1 addition & 2 deletions tests/api/v1/endpoints/test_connection_config_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4e8f0a1

Please sign in to comment.