Skip to content

Commit 1b42df2

Browse files
feat(explore): guarantees the star order to follow prebuilt_id order (#91063)
Order by `prebuilt_id` when default starring prebuilt queries to guarantee the stored order.
1 parent 7dd0f96 commit 1b42df2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sentry/explore/endpoints/explore_saved_queries.py

+1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ def sync_prebuilt_queries_starred(organization, user_id):
245245
user_id=user_id,
246246
).values_list("explore_saved_query_id", flat=True)
247247
)
248+
.order_by("prebuilt_id") # Ensures prebuilt queries are starred in the correct order
248249
.values_list("id", flat=True)
249250
)
250251
for prebuilt_query_id in prebuilt_query_ids_without_starred_status:

0 commit comments

Comments
 (0)