From 8b0423f3398a88db8fa6d5b045ecf5da7347e983 Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+partywumpus@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:28:37 +0000 Subject: [PATCH] Postgres doesn't like collate by NOCASE. but it does it by default anyway so all good --- plugin_store/database/database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_store/database/database.py b/plugin_store/database/database.py index bf8d428..ceb52e5 100644 --- a/plugin_store/database/database.py +++ b/plugin_store/database/database.py @@ -13,7 +13,7 @@ from sqlalchemy.exc import NoResultFound, SQLAlchemyError from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine from sqlalchemy.orm import sessionmaker -from sqlalchemy.sql import collate, delete, select, update +from sqlalchemy.sql import delete, select, update from constants import SortDirection, SortType @@ -174,7 +174,7 @@ async def search( direction = desc if sort_by == SortType.NAME: - statement = statement.order_by(direction(collate(Artifact.name, "NOCASE"))) + statement = statement.order_by(direction(Artifact.name)) elif sort_by == SortType.DATE: statement = statement.order_by(direction(Artifact.created)) elif sort_by == SortType.DOWNLOADS: