fix(settings): do not overlay empty SuperAdmin values onto tenant DB

Blank template values must not wipe local can_edit=0 settings like
price_provider until SuperAdmin actually saves a value for that tenant.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-19 21:47:43 +03:30
co-authored by Cursor
parent 924234bb19
commit 1c7a3ede77
@@ -62,6 +62,11 @@ class SuperAdminProgramSettingsOverlay
if ($key === '' || in_array($key, self::LOCAL_OWNED_KEYS, true) || in_array($key, self::RUNTIME_KEYS, true)) {
continue;
}
// مقدار خالی قالب سوپرادمین نباید value لوکال tenant را پاک کند
$value = $row['value'] ?? null;
if ($value === null || $value === '') {
continue;
}
$map[$key] = $row;
}