mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
fix: remove deprecated ETagResponseMixin (#21773)
This commit is contained in:
parent
8f74e46d45
commit
75e6a04269
@ -25,7 +25,7 @@ from typing import Any, Callable, Dict, Optional, TYPE_CHECKING, Union
|
|||||||
from flask import current_app as app, request
|
from flask import current_app as app, request
|
||||||
from flask_caching import Cache
|
from flask_caching import Cache
|
||||||
from flask_caching.backends import NullCache
|
from flask_caching.backends import NullCache
|
||||||
from werkzeug.wrappers.etag import ETagResponseMixin
|
from werkzeug.wrappers import Response
|
||||||
|
|
||||||
from superset import db
|
from superset import db
|
||||||
from superset.extensions import cache_manager
|
from superset.extensions import cache_manager
|
||||||
@ -175,7 +175,7 @@ def etag_cache(
|
|||||||
|
|
||||||
def decorator(f: Callable[..., Any]) -> Callable[..., Any]:
|
def decorator(f: Callable[..., Any]) -> Callable[..., Any]:
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapper(*args: Any, **kwargs: Any) -> ETagResponseMixin:
|
def wrapper(*args: Any, **kwargs: Any) -> Response:
|
||||||
# Check if the user can access the resource
|
# Check if the user can access the resource
|
||||||
if raise_for_access:
|
if raise_for_access:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user