diff --git a/files/helpers/get.py b/files/helpers/get.py index 0890bbe60..b6e88524c 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -363,13 +363,7 @@ def get_profile_picture(identifier:Union[int, str]) -> str: return x.profile_url if x else 'not_found' def get_error(): - if request.referrer and request.referrer.split('?')[0] == request.base_url: - return request.values.get("error") - else: - return None + return request.values.get("error") def get_msg(): - if request.referrer and request.referrer.split('?')[0] == request.base_url: - return request.values.get("msg") - else: - return None + return request.values.get("msg") diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index d763a2dea..98be32a43 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -185,6 +185,7 @@ {% endmacro %} {% macro alert(msg, error=false) %} +{% if request.referrer and request.referrer.split('?')[0] == request.base_url %}