Skip to content

Commit

Permalink
some error handling for WordCloud
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jan 11, 2016
1 parent 3efaec8 commit 6c92fa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions panoramix/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down

0 comments on commit 6c92fa4

Please sign in to comment.