fix(API): CommonCode 라벨 조회 시 테넌트 스코프 적용
- getLabel(), getCodeMap()에서 withoutGlobalScopes() → query()로 변경 - BelongsToTenant 스코프가 적용되어 테넌트별 공통코드 정상 조회 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user