From 1c7a3ede77ee5e6caee88c75fa225fc026b29596 Mon Sep 17 00:00:00 2001 From: adonis Date: Wed, 19 Aug 2026 21:47:43 +0330 Subject: [PATCH] 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 --- app/Services/SuperAdminProgramSettingsOverlay.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/SuperAdminProgramSettingsOverlay.php b/app/Services/SuperAdminProgramSettingsOverlay.php index f51d899..6ee727e 100644 --- a/app/Services/SuperAdminProgramSettingsOverlay.php +++ b/app/Services/SuperAdminProgramSettingsOverlay.php @@ -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; }