From 037ca92275bd8917eb7bf6f62f7613adc2bbaf36 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(); }