Skip to content

Commit ec7c117

Browse files
authored
fix(insight): New insight shouldn't be able to add to notebook or export (#38770)
1 parent 0f5c959 commit ec7c117

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frontend/src/scenes/insights/InsightPageHeader.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ export function InsightPageHeader({ insightLogicProps }: { insightLogicProps: In
261261
<ScenePanelActionsSection>
262262
{hasDashboardItemId && <SceneMetalyticsSummaryButton dataAttrKey={RESOURCE_TYPE} />}
263263

264-
<SceneAddToNotebookDropdownMenu shortId={insight.short_id} dataAttrKey={RESOURCE_TYPE} />
264+
{insight.short_id && (
265+
<SceneAddToNotebookDropdownMenu shortId={insight.short_id} dataAttrKey={RESOURCE_TYPE} />
266+
)}
265267
<SceneAddToDashboardButton
266268
dashboard={
267269
hasDashboardItemId
@@ -336,7 +338,7 @@ export function InsightPageHeader({ insightLogicProps }: { insightLogicProps: In
336338
</ButtonPrimitive>
337339
)}
338340

339-
{exportContext ? (
341+
{exportContext && insight.short_id != null ? (
340342
<SceneExportDropdownMenu
341343
dropdownMenuItems={[
342344
{

0 commit comments

Comments
 (0)