Skip to content
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

Fixing json decode error on druiddatasourcemodelview/api/read #4291

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

michellethomas
Copy link
Contributor

I've been getting a JSON decode error on druiddatasourcemodelview/api/read and from looking at this issue, it seemed like having a repr method on the DruidCluster model would work, but it seems html is needed as well for DruidDatasources to decode the relationship to DruidCluster correctly.

@john-bodley

@@ -91,6 +91,9 @@ class DruidCluster(Model, AuditMixinNullable, ImportMixin):
def __repr__(self):
return self.verbose_name if self.verbose_name else self.cluster_name

def __html__(self):
return self.verbose_name if self.verbose_name else self.cluster_name
Copy link
Member

@john-bodley john-bodley Jan 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just call self.__repr__() unless you think these method may diverge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, fixed this.

@john-bodley
Copy link
Member

LGTM

@mistercrunch mistercrunch merged commit b9299d6 into apache:master Jan 26, 2018
michellethomas added a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants