mirror of
https://github.com/apache/superset.git
synced 2026-04-25 02:55:07 +00:00
chore: proper current_app.config proxy usage (#34345)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
6c9cda758a
commit
cb27d5fe8d
@@ -19,7 +19,8 @@ from __future__ import annotations
|
||||
from datetime import datetime
|
||||
from typing import Any, cast
|
||||
|
||||
from superset import app
|
||||
from flask import current_app
|
||||
|
||||
from superset.common.query_object import QueryObject
|
||||
from superset.utils.core import FilterOperator
|
||||
from superset.utils.date_parser import get_since_until
|
||||
@@ -32,10 +33,10 @@ def get_since_until_from_time_range(
|
||||
) -> tuple[datetime | None, datetime | None]:
|
||||
return get_since_until(
|
||||
relative_start=(extras or {}).get(
|
||||
"relative_start", app.config["DEFAULT_RELATIVE_START_TIME"]
|
||||
"relative_start", current_app.config["DEFAULT_RELATIVE_START_TIME"]
|
||||
),
|
||||
relative_end=(extras or {}).get(
|
||||
"relative_end", app.config["DEFAULT_RELATIVE_END_TIME"]
|
||||
"relative_end", current_app.config["DEFAULT_RELATIVE_END_TIME"]
|
||||
),
|
||||
time_range=time_range,
|
||||
time_shift=time_shift,
|
||||
|
||||
Reference in New Issue
Block a user