getTableRecordKey(): Return value must be of type string, null

I suddenly get this error:
Filament\Resources\Pages\ListRecords::getTableRecordKey(): Return value must be of type string, null returned

In V2 I used to solve it by having this:
public function getTableRecordKey(Model $record): string
{
    return uniqid();
}


This doesn't seem to work anymore. this error came today after updating to the latest version.

the table query:
return $table
    ->query(
        Timesheet::query()
            ->select(DB::raw('DATE(DATE_FORMAT(fra_dato, \'%Y-%m-01\')) AS month, SUM(totalt) AS Totalt'))
            ->groupBy(DB::raw("DATE(DATE_FORMAT(fra_dato, '%Y-%m-01'))"))
            ->whereBetween(
                'fra_dato',
                [
                    Carbon::parse('first day of January')->format('Y-m-d H:i:s'),
                    Carbon::now()->endOfYear(),
                ]
            )
            ->where('unavailable', 0)
  )
Solution
well... the reason for the error was because of two entries in my DB that had no ID... my bad!
Was this page helpful?