Browse files

Report correct number of imported items.

  • Loading branch information...
1 parent e889f0f commit f4099f54f7ec2942af49d0f771ec51dadd6c018a @DaveDavenport committed Apr 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 EnergyPoint.vala
View
3 EnergyPoint.vala
@@ -109,12 +109,13 @@ class EnergyStorage
*/
private bool add_point(EnergyPoint ep)
{
+ var lir = db.last_insert_rowid();
insert_ep.bind_int64(1, ep.time.to_unix());
insert_ep.bind_int(2, ep.power);
insert_ep.step();
insert_ep.reset();
- if(db.last_insert_rowid() > 0) return true;
+ if(db.last_insert_rowid() != lir) return true;
return false;
}

0 comments on commit f4099f5

Please sign in to comment.