From 2556d9209f2b1f9483cbf2a9354bd124e738f465 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 15 May 2022 11:32:00 +0200 Subject: [PATCH] fix: postgres type error Fix a bug introduced in #8659. Solution was already tested there. --- packages/backend/src/server/api/endpoints/notes/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index ff62841a0..955f53bbc 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -177,7 +177,7 @@ export default define(meta, paramDef, async (ps, user) => { userId: user.id, fileIds, }) - .orderBy('array_position(ARRAY[:...fileIds], "id")') + .orderBy('array_position(ARRAY[:...fileIds], "id"::text)') .setParameters({ fileIds }) .getMany(); }