Skip to content

Commit

Permalink
Ignore table_id on card equality (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-gerber authored May 6, 2022
1 parent 5cf51fb commit 4509dae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init/src/metabase/dashboards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,9 @@ export class Dashboards {
}

private static equalCards(card1: any, card2: any): boolean {
const predicate = (v: any, k: string): boolean => k === 'id' || !v;
// series cards lack a table_id on export
const predicate = (v: any, k: string): boolean =>
k === 'id' || k === 'table_id' || !v;
return isEqual(omitBy(card1, predicate), omitBy(card2, predicate));
}
}

0 comments on commit 4509dae

Please sign in to comment.