Skip to content

Commit

Permalink
Revert "Update superset/queries/saved_queries/commands/importers/v1/u…
Browse files Browse the repository at this point in the history
…tils.py"

This reverts commit 18580aa.
  • Loading branch information
AAfghahi committed Apr 8, 2021
1 parent 18580aa commit a48bd8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/queries/saved_queries/commands/importers/v1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ 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 and not overwrite:
if existing:
if 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 a48bd8c

Please sign in to comment.