fix test errors
API CI/CD / Validate (composer + pint) (push) Successful in 2m47s
API CI/CD / Test (PHPUnit) (push) Failing after 3m8s
API CI/CD / Build frontend assets (push) Failing after 5m22s
API CI/CD / Security audit (push) Failing after 34s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 2m47s
API CI/CD / Test (PHPUnit) (push) Failing after 3m8s
API CI/CD / Build frontend assets (push) Failing after 5m22s
API CI/CD / Security audit (push) Failing after 34s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -212,11 +212,14 @@ class StudentAssignmentService
|
||||
if ($enrollment) {
|
||||
$newClassId = ! empty($remainingIds) ? $remainingIds[0] : null;
|
||||
if ((int) $enrollment->class_section_id === $classSectionId || $newClassId !== null) {
|
||||
$enrollment->update([
|
||||
$updates = [
|
||||
'class_section_id' => $newClassId,
|
||||
'updated_at' => now(),
|
||||
'updated_by' => $userId,
|
||||
]);
|
||||
];
|
||||
if (Schema::hasColumn('enrollments', 'updated_by')) {
|
||||
$updates['updated_by'] = $userId;
|
||||
}
|
||||
$enrollment->update($updates);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user