fix(sqllab): null database with backend persistence (#19548)

(cherry picked from commit 2d81c4c79f)
This commit is contained in:
Ville Brofeldt
2022-04-06 12:32:41 +03:00
committed by Ville Brofeldt
parent 34e3119c40
commit c4d24a09a8
2 changed files with 17 additions and 6 deletions

View File

@@ -118,7 +118,7 @@ class Query(Model, ExtraJSONMixin):
"changedOn": self.changed_on,
"changed_on": self.changed_on.isoformat(),
"dbId": self.database_id,
"db": self.database.database_name,
"db": self.database.database_name if self.database else None,
"endDttm": self.end_time,
"errorMessage": self.error_message,
"executedSql": self.executed_sql,