Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
a7465b3a
Commit
a7465b3a
authored
7 years ago
by
Atte Keinänen
Browse files
Options
Downloads
Patches
Plain Diff
Have a correct url and show the lineage correctly
parent
ea331c73
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/metabase/query_builder/actions.js
+8
-8
8 additions, 8 deletions
frontend/src/metabase/query_builder/actions.js
with
8 additions
and
8 deletions
frontend/src/metabase/query_builder/actions.js
+
8
−
8
View file @
a7465b3a
...
...
@@ -160,15 +160,15 @@ export const initializeQB = createThunkAction(INITIALIZE_QB, (location, params)
card
=
serializedCard
?
deserializeCardFromUrl
(
serializedCard
)
:
{}
// load the card either from `cardId` parameter or the serialized card
const
cardId
=
params
.
cardId
||
card
.
id
if
(
cardId
)
{
const
loadedCard
=
await
loadCard
(
cardId
);
if
(
params
.
cardId
)
{
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
(
loadedCard
);
// the serialized card often differs from the card stored in db so merge the properties to fetched card if needed
card
=
{...
loadedCard
,
...
card
};
originalCard
=
Utils
.
copy
(
card
);
}
else
if
(
card
.
id
)
{
// deserialized card contains the card id, so just populate originalCard
originalCard
=
await
loadCard
(
card
.
id
);
// strip the card id from the deserialized card so that we have a correct url and show lineage correctly
card
=
_
.
omit
(
card
,
"
id
"
);
}
MetabaseAnalytics
.
trackEvent
(
"
QueryBuilder
"
,
"
Query Loaded
"
,
card
.
dataset_query
.
type
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment