mirror of
https://github.com/akuker/RASCSI.git
synced 2025-07-18 04:24:11 +00:00
Run web API test suite in GitHub Actions (#1009)
- Fixed ignore patterns in .dockerignore - Added healthchecks to backend and web containers - Reduced Docker image sizes - Removed RaSCSI references in various areas (e.g. rascsi -> backend) - Added compilation-only step to easyinstall.sh - Moved apt package lists to variables - Revert to triggering GitHub Actions runs on push - Updated web/frontend_checks workflow to run black and flake8 against all Python sources - Capture log files from backend/web containers - Fix None to float conversion bug when user agent is absent or unrecognised
This commit is contained in:
@@ -324,10 +324,17 @@ def browser_supports_modern_themes():
|
||||
]
|
||||
|
||||
current_ua_family = user_agent["user_agent"]["family"]
|
||||
current_ua_version = float(user_agent["user_agent"]["major"])
|
||||
current_ua_version = user_agent["user_agent"]["major"]
|
||||
logging.info(f"Identified browser as family={current_ua_family}, version={current_ua_version}")
|
||||
|
||||
# Supported browsers cannot be identified without a version
|
||||
if not current_ua_version:
|
||||
return False
|
||||
|
||||
for supported_browser, supported_version in supported_browsers:
|
||||
if current_ua_family == supported_browser and current_ua_version >= supported_version:
|
||||
if (
|
||||
current_ua_family == supported_browser
|
||||
and float(current_ua_version) >= supported_version
|
||||
):
|
||||
return True
|
||||
return False
|
||||
|
Reference in New Issue
Block a user