Skip to content

Commit

Permalink
Update superset/queries/saved_queries/commands/importers/v1/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
  • Loading branch information
AAfghahi and hughhhh authored Apr 8, 2021
1 parent aec0aab commit 18580aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions superset/queries/saved_queries/commands/importers/v1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ def import_saved_query(
session: Session, config: Dict[str, Any], overwrite: bool = False
) -> SavedQuery:
existing = session.query(SavedQuery).filter_by(uuid=config["uuid"]).first()
if existing:
if not overwrite:
if existing and not overwrite:
return existing
config["id"] = existing.id
config["id"] = existing.id

saved_query = SavedQuery.import_from_dict(session, config, recursive=False)
if saved_query.id is None:
Expand Down

0 comments on commit 18580aa

Please sign in to comment.