fix:체크리스트 토글 checkpoint_index NOT NULL 오류 수정
- 새 레코드 생성 시 checkpoint_index 기본값 0 설정 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,9 +83,10 @@ public static function toggle(int $tenantId, string $scenarioType, int $stepId,
|
||||
'checkpoint_id' => $checkpointId,
|
||||
]);
|
||||
|
||||
// 새 레코드인 경우 user_id 설정 (하위 호환성)
|
||||
// 새 레코드인 경우 필수 필드 설정
|
||||
if (!$checklist->exists) {
|
||||
$checklist->user_id = $currentUserId;
|
||||
$checklist->checkpoint_index = 0; // 기본값
|
||||
}
|
||||
|
||||
$checklist->is_checked = $checked;
|
||||
|
||||
Reference in New Issue
Block a user