mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: add back custom sql filtering with Query as source (#21190)
This commit is contained in:
@@ -42,6 +42,7 @@ from sqlalchemy.engine.url import URL
|
||||
from sqlalchemy.orm import backref, relationship
|
||||
|
||||
from superset import security_manager
|
||||
from superset.jinja_context import BaseTemplateProcessor, get_template_processor
|
||||
from superset.models.helpers import (
|
||||
AuditMixinNullable,
|
||||
ExploreMixin,
|
||||
@@ -126,6 +127,9 @@ class Query(
|
||||
|
||||
__table_args__ = (sqla.Index("ti_user_id_changed_on", user_id, changed_on),)
|
||||
|
||||
def get_template_processor(self, **kwargs: Any) -> BaseTemplateProcessor:
|
||||
return get_template_processor(query=self, database=self.database, **kwargs)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"changedOn": self.changed_on,
|
||||
|
||||
Reference in New Issue
Block a user