fix: chart import validation (#26993)

This commit is contained in:
Daniel Vaz Gaspar
2024-02-06 12:14:02 +00:00
committed by Michael S. Molina
parent e772915bb8
commit c029475f60
13 changed files with 404 additions and 146 deletions

View File

@@ -1415,6 +1415,15 @@ def split_adhoc_filters_into_base_filters( # pylint: disable=invalid-name
form_data["filters"] = simple_where_filters
def get_user() -> User | None:
"""
Get the current user (if defined).
:returns: The current user
"""
return g.user if hasattr(g, "user") else None
def get_username() -> str | None:
"""
Get username (if defined) associated with the current user.