Skip to content

Commit

Permalink
[bugfix] fails on None view_menu (#3155)
Browse files Browse the repository at this point in the history
* [bugfix]  fails on None view_menu

* Update coveralls token
  • Loading branch information
mistercrunch authored Jul 19, 2017
1 parent 27fab0d commit d7e4191
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
repo_token: eESbYiv4An6KEvjpmguDs4L7YkubXbqn1
repo_token: 4P9MpvLrZfJKzHdGZsdV3MzO43OZJgYFn
3 changes: 2 additions & 1 deletion superset/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def create_missing_perms():
"Fetching a set of all perms to lookup which ones are missing")
all_pvs = set()
for pv in sm.get_session.query(sm.permissionview_model).all():
all_pvs.add((pv.permission.name, pv.view_menu.name))
if pv.permission and pv.view_menu:
all_pvs.add((pv.permission.name, pv.view_menu.name))

def merge_pv(view_menu, perm):
"""Create permission view menu only if it doesn't exist"""
Expand Down

0 comments on commit d7e4191

Please sign in to comment.