Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
Shengyao Qian committed Apr 21, 2017
1 parent e5c5c0b commit f9fd7d2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions superset/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from superset.utils import QueryStatus
from superset import sm


class ImportMixin(object):
def override(self, obj):
"""Overrides the plain fields of the dashboard."""
Expand Down Expand Up @@ -116,6 +117,7 @@ def __init__( # noqa
self.status = status
self.error_message = error_message


def merge_perm(sm, permission_name, view_menu_name, connection):

permission = sm.find_permission(permission_name)
Expand Down Expand Up @@ -145,10 +147,13 @@ def merge_perm(sm, permission_name, view_menu_name, connection):
permission_view_table = sm.permissionview_model.__table__
connection.execute(
permission_view_table.insert()
.values(permission_id=permission.id,
view_menu_id=view_menu.id)
.values(
permission_id=permission.id,
view_menu_id=view_menu.id
)
)


def set_perm(mapper, connection, target): # noqa

if target.perm != target.get_perm():
Expand Down

0 comments on commit f9fd7d2

Please sign in to comment.