Skip to content

Commit

Permalink
[hotfix] slice with missing datasource related
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 5, 2017
1 parent b7f46eb commit 337454b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def set_related_perm(mapper, connection, target): # noqa
src_class = target.cls_model
id_ = target.datasource_id
ds = db.session.query(src_class).filter_by(id=int(id_)).first()
target.perm = ds.perm
if ds:
target.perm = ds.perm


class Url(Model, AuditMixinNullable):
Expand Down

0 comments on commit 337454b

Please sign in to comment.