Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
gte451f committed Feb 2, 2018
2 parents 62f9ced + d868054 commit cee78d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/API/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,12 @@ public function save($formData, $id = null)

// need parent logic here
$this->model = ($this->model)::findFirst($id);
if (!$this->model) {
throw new HTTPException("Could not find record #$id to update.", 404, [
'dev' => "No record was found to update",
'code' => '293542512610127'
]);
}
$primaryModel = $this->loadParentModel($this->model, $formData);

// // TODO this only works with 1 parent so far....
Expand Down

0 comments on commit cee78d0

Please sign in to comment.