Skip to content
Snippets Groups Projects
Commit c99b558f authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Retain the original card id if QB starts from a saved question

parent d2a8a641
Branches
Tags
No related merge requests found
......@@ -168,6 +168,9 @@ export const initializeQB = createThunkAction(INITIALIZE_QB, (location, params)
card = await loadCard(params.cardId);
// when we are loading from a card id we want an explicit clone of the card we loaded which is unmodified
originalCard = Utils.copy(card);
// for showing the "started from" lineage correctly when adding filters/breakouts and when going back and forth
// in browser history, the original_card_id has to be set for the current card (simply the id of card itself for now)
card.original_card_id = card.id;
} else if (card.original_card_id) {
// deserialized card contains the original card id, so just populate originalCard
originalCard = await loadCard(card.original_card_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment