Ensure the models primary key is always available in the URL values

Fixes https://github.com/rainlab/forum-plugin/issues/74
This commit is contained in:
Samuel Georges 2015-08-05 07:48:18 +10:00
parent 4e99ea6435
commit 23dc27e679
1 changed files with 2 additions and 0 deletions

View File

@ -520,6 +520,8 @@ class Lists extends WidgetBase
}
$data = $record->toArray();
$data += [$record->getKeyName() => $record->getKey()];
$columns = array_keys($data);
$url = RouterHelper::parseValues($data, $columns, $this->recordUrl);