-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dashboard] use filter_scopes metadata when import old dashboard #9145
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -278,6 +278,12 @@ def alter_params(self, **kwargs): | |
d.update(kwargs) | ||
self.params = json.dumps(d) | ||
|
||
def remove_params(self, param, **kwargs): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we pass in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, typing plz ❤️ |
||
d = self.params_dict | ||
d.pop(param, None) | ||
d.update(kwargs) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry, what I meant was - is this function ever called with keyword arguments? It looks like you only called it with the positional argument There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. Thanks! |
||
self.params = json.dumps(d) | ||
|
||
def reset_ownership(self): | ||
""" object will belong to the user the current user """ | ||
# make sure the object doesn't have relations to a user | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way we can avoid having this special logic? I'm worried about code in Superset getting (even more) bloated. When will
create_from_import
have the extra fields? Will it always? Is it ok to just not support this case and warn that your change is not backwards compatible?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export dashboard
andimport dashboard
is a widely used feature in Superset. it helps ppl to move dashboard from different data system (and both of them use Superset). If someone wants to copy a dashboard from an older system which didn't upgrade recently, but the other system used updated version, this PR can make their export - import routine keep working.if the backward compatible only introduce a couple of lines, I would like to keep it. But if it will introduce a lot of overhead, i will not maintain it.