mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(sql lab): deleting the last saved query or the last executed from history (#19225)
* fix: fix issue when deleting the last saved query or the last executed query * merge migration
This commit is contained in:
@@ -291,7 +291,9 @@ class TabState(Model, AuditMixinNullable, ExtraJSONMixin):
|
||||
hide_left_bar = Column(Boolean, default=False)
|
||||
|
||||
# any saved queries that are associated with the Tab State
|
||||
saved_query_id = Column(Integer, ForeignKey("saved_query.id"), nullable=True)
|
||||
saved_query_id = Column(
|
||||
Integer, ForeignKey("saved_query.id", ondelete="SET NULL"), nullable=True
|
||||
)
|
||||
saved_query = relationship("SavedQuery", foreign_keys=[saved_query_id])
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user