chore: align local checks
This commit is contained in:
@@ -16,6 +16,7 @@ frontend/node_modules/
|
||||
docs-site/node_modules/
|
||||
docs-site/.astro/
|
||||
docs-site/dist/
|
||||
docs-site/public/demo/runtime/
|
||||
docs-site/src/content/docs/
|
||||
frontend-nginx-dist/
|
||||
deploy/compose/docker-compose-dev.yml
|
||||
|
||||
@@ -661,8 +661,7 @@ class PaykillaService(HttpClientMixin):
|
||||
return cached_data
|
||||
if response.status != 200 or not isinstance(response_data, list):
|
||||
logging.warning(
|
||||
"Paykilla currency metadata request failed "
|
||||
"(status=%s, body=%s)",
|
||||
"Paykilla currency metadata request failed (status=%s, body=%s)",
|
||||
response.status,
|
||||
response_data,
|
||||
)
|
||||
|
||||
@@ -832,8 +832,7 @@ class SubscriptionLifecycleMixin:
|
||||
traffic_limit = (
|
||||
self._traffic_limit_for_period_tariff(bonus_tariff)
|
||||
if bonus_tariff
|
||||
else
|
||||
self.settings.user_traffic_limit_bytes
|
||||
else self.settings.user_traffic_limit_bytes
|
||||
if apply_main_traffic_limit
|
||||
else self.settings.trial_traffic_limit_bytes
|
||||
)
|
||||
@@ -922,8 +921,7 @@ class SubscriptionLifecycleMixin:
|
||||
traffic_limit_bytes=(
|
||||
updated_sub_model.traffic_limit_bytes
|
||||
if bonus_tariff
|
||||
else
|
||||
self.settings.user_traffic_limit_bytes
|
||||
else self.settings.user_traffic_limit_bytes
|
||||
if apply_main_traffic_limit and not preserve_tariff_limits
|
||||
else None
|
||||
),
|
||||
|
||||
@@ -24,8 +24,7 @@ export function devicesCountLabel(devicesData, t, maxDevicesOverride) {
|
||||
|
||||
export function devicesPercent(devicesData, maxDevicesOverride) {
|
||||
const current = Number(devicesData?.current_devices ?? devicesData?.devices?.length ?? 0);
|
||||
const maxValue =
|
||||
maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices;
|
||||
const maxValue = maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices;
|
||||
if (maxValue === undefined || maxValue === null || maxValue === "") return 0;
|
||||
const max = Number(maxValue || 0);
|
||||
if (!max || max <= 0) return 100;
|
||||
|
||||
@@ -592,7 +592,7 @@ class WebAppAssetTests(unittest.IsolatedAsyncioTestCase):
|
||||
|
||||
def test_frontend_nginx_proxies_shell_routes_for_dynamic_head(self):
|
||||
nginx_conf = Path("deploy/docker/frontend/nginx.conf").read_text(encoding="utf-8")
|
||||
marker = "location ~ ^/(?:$|login/password$|home$|install$|trial$|s/[a-f0-9]{32}$"
|
||||
marker = 'location ~ "^/(?:$|login/password$|home$|install$|trial$|s/[a-f0-9]{32}$'
|
||||
|
||||
self.assertIn(marker, nginx_conf)
|
||||
start = nginx_conf.index(marker)
|
||||
|
||||
@@ -6,7 +6,6 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user