Commit cb756731 authored by Lucas Henrique's avatar Lucas Henrique
Browse files

Resolvendo problema ao editar um projeto sem discente

parent ddb016c1
......@@ -870,6 +870,7 @@ class TrabalhoController extends Controller
$trabalho = $this->armazenarAnexosFinais($request, $pasta, $trabalho, $evento);
$trabalho->save();
if ($evento->numParticipantes != 0) {
if ($request->marcado == null) {
$idExcluido = $trabalho->participantes->pluck('id');
......@@ -889,6 +890,7 @@ class TrabalhoController extends Controller
$trabalho->participantes()->find($value)->delete();
}
$trabalho->refresh();
}
if ($request->has('marcado')) {
foreach ($request->marcado as $key => $part) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment