Skip to content

Commit

Permalink
Update ModelController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
autocode2020 committed Dec 12, 2022
1 parent cfb589f commit 0129957
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Controllers/ModelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function select($name, $id)

return $model
->setFromEntity()
->fields()
->where($bind->cell->name, "=", $bind->value)
->take(1)
->get()
Expand Down Expand Up @@ -175,7 +176,7 @@ public function update($name, Fluent $params)
$data = new DataSet($model);

foreach ($model->root->cells as $alias=>$cell) {
if (!$cell->system and ($cell->required or isset($params[$alias])) and !$cell->immutable) {
if (!$cell->system and isset($params[$alias]) and !$cell->immutable) {
$bind = new Binds\SimpleBind($cell);
if (isset($params[$alias])) {
$bind->value = $params[$alias];
Expand Down

0 comments on commit 0129957

Please sign in to comment.