From 0e6dc8ffd9c07dfaa8d980bdefb5947b249fb032 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Thu, 11 Jan 2024 12:19:05 +0100 Subject: [PATCH] fix: Users are unable to delete some saved queries (#20341) The comparison was with with the wrong owner id. --- apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx b/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx index 07f44b6557b..068c1728bd3 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx @@ -104,7 +104,7 @@ const QueryItemActions = observer(({ tabInfo, activeId }: QueryItemActionsProps) ? snap.snippets[snippetID] : null - const isSnippetOwner = profile?.id === snippet?.snippet?.owner?.id + const isSnippetOwner = profile?.id === snippet?.snippet.owner_id const { mutate: deleteContent, isLoading: isDeleting } = useContentDeleteMutation({ onSuccess(data) {