Skip to content

Commit

Permalink
[hotfix] init CLI command edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jul 14, 2017
1 parent 256a521 commit 86866fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/security.py
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 86866fe

Please sign in to comment.