Skip to content

Commit bbbe106

Browse files
committed
fix: accept participant upload without title column
1 parent 8e8cc48 commit bbbe106

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/Http/Controllers/ProjectController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ public function importParticipantUpload(Request $request) {
620620
if ($existingParticipant = $project->participants->where('user_id', $student->id)->first()) {
621621
if ($request->filled('project') and (ProjectParticipant::TYPES_RANK[$existingParticipant->type] < ProjectParticipant::TYPES_RANK[$row['type']])) {
622622
$messages [] = 'WARNING: '.$row['student_id'].' มีอยู่แล้วและมีตำแหน่งที่สูงกว่า ไม่บันทึกข้อมูลใหม่';
623-
} elseif ($existingParticipant->type != $row['type'] or $existingParticipant->title != $row['title']) {
623+
} elseif ($existingParticipant->type != $row['type'] or $existingParticipant->title != ($row['title'] ?? '')) {
624624
$toAdd->add([
625625
'user_id' => $student->id,
626626
'user_name' => $student->name,

0 commit comments

Comments
 (0)