Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ const CollectionHeader = ({
onUpdateCollection={onUpdateCollection}
/>
<HeaderActions data-testid="collection-menu">
{showUploadButton && (
<CollectionUpload
collection={collection}
uploadsEnabled={uploadsEnabled}
isAdmin={isAdmin}
saveFile={saveFile}
/>
)}
{!isInstanceAnalytics && <CollectionTimeline collection={collection} />}
{isInstanceAnalytics && (
<CollectionPermissions collection={collection} />
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/metabase/dashboard/actions/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ export const tabsReducer = createReducer<DashboardState>(
);

builder.addCase(Dashboards.actionTypes.UPDATE, (state, { payload }) => {
if (!payload.dashboard) {
return;
}
const { dashcards: newDashcards, tabs: newTabs } = payload.dashboard;

const { prevDash, prevTabs } = getPrevDashAndTabs({
Expand All @@ -536,7 +539,7 @@ export const tabsReducer = createReducer<DashboardState>(
const prevDashcardData = state.dashcardData[prevId];

if (prevDashcardData) {
state.dashcardData[newDashcards[index].id] = prevDashcardData;
state.dashcardData[newDashcards[index]?.id] = prevDashcardData;
}
});

Expand Down
1 change: 1 addition & 0 deletions frontend/src/metabase/redux/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const currentUser = createReducer<User | null>(null, builder => {
const { dashboard } = payload;
if (
state != null &&
dashboard != null &&
state.custom_homepage?.dashboard_id === dashboard.id &&
dashboard.archived
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import { getActivePulseParameters } from "metabase/lib/pulse";
import { formatFrame } from "metabase/lib/time";
import { Icon } from "metabase/ui";
import { getUser } from "metabase/home/selectors";
import { getUser } from "metabase/selectors/user";
import Settings from "metabase/lib/settings";

import { PulseCard, SidebarActions } from "./PulsesListSidebar.styled";
Expand Down
4 changes: 3 additions & 1 deletion src/metabase/models/dashboard.clj
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@
[:collection :collection] [:= :collection.id :card.collection_id]]
:where [:and
[:in :dashcard.dashboard_id (map :id dashboards)]
[:= :card.simpro_removed false]
[:or
[:= :card.simpro_removed false]
[:= :card.simpro_removed nil]] ;handle virtual cards
[:or
[:= :card.archived false]
[:= :card.archived nil]]] ; e.g. DashCards with no corresponding Card, e.g. text Cards
Expand Down