Skip to content
Snippets Groups Projects
Commit ea9d381a authored by a.croix's avatar a.croix
Browse files

Update getJobProgression to avoid error

parent dd3aa44f
No related branches found
No related tags found
1 merge request!1Include Wowa Training
Pipeline #5927 failed
......@@ -4,7 +4,6 @@
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Log extends Model
{
......@@ -17,8 +16,7 @@ class Log extends Model
$logs = self::where('job_id', '=', $wowa->id)->orderBy('progression', 'desc')->first();
if (!is_object($logs)) {
return "Calculation in progress...";
}
if ($wowa->status == Wowa::STATE_COLLECTION) {
} elseif ($wowa->status == Wowa::STATE_COLLECTION) {
$log = self::where('job_id', '=', $wowa->id)
->where('training', '=', false)->orderBy('progression', 'desc')->first();
return $log->progression;
......
......@@ -20,7 +20,7 @@
<th>User</th>
<th>Score</th>
<th>Status</th>
<th>Progression</th>
<th>Progression (%)</th>
<th></th>
</tr>
@foreach($wowas as $wowa)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment