mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
some error handling for WordCloud
This commit is contained in:
parent
3efaec8983
commit
6c92fa471d
@ -445,6 +445,9 @@ class WordCloudViz(BaseViz):
|
||||
|
||||
def query_obj(self):
|
||||
d = super(WordCloudViz, self).query_obj()
|
||||
if len(d['groupby']) < 1:
|
||||
raise Exception("Pick at least one field to group by")
|
||||
|
||||
metric = self.form_data.get('metric')
|
||||
if not metric:
|
||||
raise Exception("Pick a metric!")
|
||||
|
Loading…
Reference in New Issue
Block a user