From a6d931334a6b2b61db3562db8124b1dca985ca2b Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Wed, 12 May 2021 02:11:46 +0300 Subject: [PATCH] Added ORDER BY to category tree to ensure db order of children --- src/models/category.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/models/category.go b/src/models/category.go index 009c6718..d6bce87c 100644 --- a/src/models/category.go +++ b/src/models/category.go @@ -67,6 +67,7 @@ func GetFullCategoryTree(ctx context.Context, conn *pgxpool.Pool) CategoryTree { SELECT $columns FROM handmade_category as cat + ORDER BY id ASC `, ) if err != nil {