From c111b2b55d98fb62db6ea42f4ed44c62b12083ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 30 Jan 2026 15:35:36 +0900 Subject: [PATCH] =?UTF-8?q?fix(API):=20CommonCode=20=EB=9D=BC=EB=B2=A8=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=8B=9C=20=ED=85=8C=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=8A=A4=EC=BD=94=ED=94=84=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - getLabel(), getCodeMap()에서 withoutGlobalScopes() → query()로 변경 - BelongsToTenant 스코프가 적용되어 테넌트별 공통코드 정상 조회 Co-Authored-By: Claude Opus 4.5 --- app/Models/Products/CommonCode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Products/CommonCode.php b/app/Models/Products/CommonCode.php index 36dc1c1..0ce13e8 100644 --- a/app/Models/Products/CommonCode.php +++ b/app/Models/Products/CommonCode.php @@ -59,7 +59,7 @@ public static function getLabel(string $codeGroup, ?string $code): string return ''; } - $commonCode = static::withoutGlobalScopes() + $commonCode = static::query() ->where('code_group', $codeGroup) ->where('code', $code) ->where('is_active', true) @@ -76,7 +76,7 @@ public static function getLabel(string $codeGroup, ?string $code): string */ public static function getCodeMap(string $codeGroup): array { - return static::withoutGlobalScopes() + return static::query() ->where('code_group', $codeGroup) ->where('is_active', true) ->orderBy('sort_order')