logicpowerhouse 4 rokov pred
rodič
commit
76dbca0048
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      app/Models/Client.php

+ 1 - 1
app/Models/Client.php

@@ -118,7 +118,7 @@ class Client extends Model
         return $this->hasMany(Measurement::class, 'client_id', 'id')
             /*->distinct('label')*/
             ->where('is_removed', false)
-            ->orderBy('ts', 'desc');
+            ->orderByRaw('ts DESC NULLS LAST');
     }
 
     public function nonZeroMeasurements()