Skip to content

Commit

Permalink
Postgres doesn't like collate by NOCASE. but it does it by default an…
Browse files Browse the repository at this point in the history
…yway so all good
  • Loading branch information
PartyWumpus authored and gbdlin committed Aug 8, 2024
1 parent e61d217 commit 8b0423f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin_store/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8b0423f

Please sign in to comment.