dpgaspar commented on code in PR #40580:
URL: https://github.com/apache/superset/pull/40580#discussion_r3379645875
##########
superset/models/sql_lab.py:
##########
@@ -588,6 +588,17 @@ class TabState(AuditMixinNullable, ExtraJSONMixin, Model):
saved_query = relationship("SavedQuery", foreign_keys=[saved_query_id])
def to_dict(self) -> dict[str, Any]:
+ latest_query = None
+ try:
+ if self.latest_query:
+ latest_query = self.latest_query.to_dict()
+ except Exception:
+ logger.warning(
+ "Failed to load/serialize latest_query for tab state %s",
Review Comment:
I've improved the log, hopping we get more clarity on what is happening here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]