Skip to content

Commit

Permalink
fix(data-warehouse): Fix editing a view button (#24067)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilbert09 authored Jul 30, 2024
1 parent 6a06767 commit 33b664e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { insightLogic } from 'scenes/insights/insightLogic'
import { urls } from 'scenes/urls'

import { Query } from '~/queries/Query/Query'
import { DatabaseSchemaTable } from '~/queries/schema'
import { DatabaseSchemaTable, NodeKind } from '~/queries/schema'

import { viewLinkLogic } from '../viewLinkLogic'
import { ViewLinkModal } from '../ViewLinkModal'
Expand Down Expand Up @@ -130,7 +130,12 @@ export const DatabaseTableTreeWithItems = ({ inline }: DatabaseTableTreeProps):
{table.type == 'view' && (
<LemonButton
onClick={() => {
router.actions.push(urls.dataWarehouseView(table.id, table.query))
router.actions.push(
urls.dataWarehouseView(table.id, {
kind: NodeKind.DataVisualizationNode,
source: table.query,
})
)
}}
data-attr="schema-list-item-edit"
fullWidth
Expand Down

0 comments on commit 33b664e

Please sign in to comment.