Skip to content

Commit

Permalink
Improve support for non-id primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers authored Jul 5, 2017
1 parent 9b2e37e commit 1a5e86e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/backend/formwidgets/TagList.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected function hydrateRelationSaveValue($names)

foreach ($newTags as $newTag) {
$newModel = $relationModel::create([$this->nameFrom => $newTag]);
$existingTags[$newModel->id] = $newTag;
$existingTags[$newModel->getKey()] = $newTag;
}

return array_keys($existingTags);
Expand Down

0 comments on commit 1a5e86e

Please sign in to comment.