Skip to content

Commit

Permalink
fix key
Browse files Browse the repository at this point in the history
  • Loading branch information
it-can committed Sep 21, 2015
1 parent f2e1216 commit 1d68d5e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Picqer/Financials/Exact/Persistance/Storable.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ public function insert()

public function update()
{
return $this->connection()->put($this->url . "(guid'$this->attributes[$this->primaryKey]')", $this->json());
$key = $this->primaryKey;
$primarykey = $this->$key;

return $this->connection()->put($this->url . "(guid'$primarykey')", $this->json());
}

public function delete()
{
return $this->connection()->delete($this->url . "(guid'$this->attributes[$this->primaryKey]')");
$key = $this->primaryKey;
$primarykey = $this->$key;

return $this->connection()->delete($this->url . "(guid'$primarykey')");
}
}

0 comments on commit 1d68d5e

Please sign in to comment.