Skip to content

Commit

Permalink
remove database_id from history changed
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Sep 27, 2021
1 parent f6c30fc commit 08d2a94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from collections import defaultdict
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from pprint import pprint
from typing import (
Any,
cast,
Expand Down Expand Up @@ -1662,8 +1663,7 @@ def before_update(

# Check whether the relevant attributes have changed.
state = db.inspect(target) # pylint: disable=no-member

for attr in ["database_id", "schema", "table_name"]:
for attr in ["schema", "table_name"]:
history = state.get_history(attr, True)

if history.has_changes():
Expand All @@ -1673,7 +1673,7 @@ def before_update(

if not DatasetDAO.validate_uniqueness(
target.database_id, target.schema, target.table_name
) and hasattr(target, "columns"):
):
raise Exception(get_dataset_exist_error_msg(target.full_name))

@staticmethod
Expand Down

0 comments on commit 08d2a94

Please sign in to comment.