Compare commits

...

1 Commits

Author SHA1 Message Date
Aiirondev_dev c07d4e0bdd Changes to match the designated endpoint of the user when uploading an Item to dont have the system Jump between the systems.
Release Inventarsystem / release-docker (push) Successful in 2m19s
2026-08-09 23:59:13 +02:00
+2 -6
View File
@@ -5177,17 +5177,13 @@ def upload_item():
fs = get_gridfs()
can_access_admin_home = _page_access_allowed(permissions, 'home_admin') and _action_access_allowed(permissions, 'can_manage_settings')
if can_access_admin_home:
success_redirect_endpoint = 'home_admin'
elif cfg.MODULES.is_enabled('library') and _page_access_allowed(permissions, 'home_library'):
success_redirect_endpoint = 'home_library'
if cfg.MODULES.is_enabled('library') and sanitize_form_value(request.form.get('item_type_input', '')) != "other":
success_redirect_endpoint = 'library'
else:
success_redirect_endpoint = 'home_admin'
# Detect if request is from mobile device
is_mobile = 'Mobile' in request.headers.get('User-Agent', '')
is_ios = 'iPhone' in request.headers.get('User-Agent', '') or 'iPad' in request.headers.get('User-Agent', '')
# Log mobile request for debugging
if is_mobile: