Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a React-based table editor #5186

Merged
merged 6 commits into from
Aug 6, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more corrections
  • Loading branch information
mistercrunch committed Aug 3, 2018
commit a9da24604de3ccab37236ac6ab23ad91d95ce546
6 changes: 3 additions & 3 deletions superset/connectors/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ def get_fk_many_from_list(
orm_kwargs = {}
for k in obj:
if (
k in fkmany_class.update_from_object_fields and
k in obj
k in fkmany_class.update_from_object_fields and
k in obj
):
orm_kwargs[k] = obj[k]
new_obj = fkmany_class(**orm_kwargs)
Expand All @@ -320,7 +320,7 @@ def update_from_object(self, obj):
"""Update datasource from a data structure

The UI's table editor crafts a complex data structure that
contains most of the datsource's properties as well as
contains most of the datasource's properties as well as
an array of metrics and columns objects. This method
receives the object from the UI and syncs the datasource to
match it. Since the fields are different for the different
Expand Down
4 changes: 2 additions & 2 deletions superset/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def check_ownership(obj, raise_if_false=True):
if raise_if_false:
raise security_exception
return False
roles = (r.name for r in get_user_roles())
roles = [r.name for r in get_user_roles()]
if 'Admin' in roles:
return True
session = db.create_scoped_session()
Expand All @@ -312,7 +312,7 @@ def check_ownership(obj, raise_if_false=True):
if hasattr(orig_obj, 'created_by'):
owners += [orig_obj.created_by]

owner_names = (o.username for o in owners)
owner_names = [o.username for o in owners]

if (
g.user and hasattr(g.user, 'username') and
Expand Down