From b354287925c6c932d25acee1cc8a566c72c3d58a Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 30 Jun 2023 10:29:11 +0200 Subject: [PATCH] fix(api): feature falg sort by updated timestamp instead of created --- api/chalicelib/core/feature_flags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/chalicelib/core/feature_flags.py b/api/chalicelib/core/feature_flags.py index 520fb3cf5..db54c2600 100644 --- a/api/chalicelib/core/feature_flags.py +++ b/api/chalicelib/core/feature_flags.py @@ -64,7 +64,7 @@ def search_feature_flags(project_id: int, user_id: int, data: schemas.SearchFlag SELECT COUNT(1) OVER () AS count, {", ".join(feature_flag_columns)} FROM feature_flags WHERE {" AND ".join(constraints)} - ORDER BY created_at {data.order.value} + ORDER BY updated_at {data.order.value} LIMIT %(limit)s OFFSET %(offset)s; """