PicoDb update

This commit is contained in:
Frederic Guillot
2015-06-27 00:00:43 -04:00
parent 7a22f4c6d4
commit 1823430d13
18 changed files with 28 additions and 28 deletions

View File

@@ -64,7 +64,7 @@ class Currency extends Base
*/
public function create($currency, $rate)
{
if ($this->db->table(self::TABLE)->eq('currency', $currency)->count() === 1) {
if ($this->db->table(self::TABLE)->eq('currency', $currency)->exists()) {
return $this->update($currency, $rate);
}