Skip to content

Commit

Permalink
Merge pull request octobercms#2507 from oliverpool/patch-1
Browse files Browse the repository at this point in the history
Use the otherKey to update a relation
  • Loading branch information
daftspunk authored Nov 27, 2016
2 parents 29040b4 + 0119351 commit f1d746a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/backend/formwidgets/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ protected function makeRenderFormField()
}

$field->options = $usesTree
? $result->listsNested($nameFrom, $relationModel->getKeyName())
: $result->lists($nameFrom, $relationModel->getKeyName());
? $result->listsNested($nameFrom, $relationObject->getOtherKey())
: $result->lists($nameFrom, $relationObject->getOtherKey());

return $field;
});
Expand Down

0 comments on commit f1d746a

Please sign in to comment.