Permalink
Browse files

stop overwriting auto-increment

  • Loading branch information...
1 parent 8f3acc2 commit 574cb947c39375838856cf73cbbd7023b52153c1 @truthtrap truthtrap committed Jul 25, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 events.py
View
@@ -67,9 +67,10 @@ def __init__(self, key, access, cluster):
domain = self.__domain(self.sdb, self.events)
- auto_increment = domain.new_item('auto-increment')
- auto_increment.add_value('value',0)
- auto_increment.save(replace=True)
+ if domain.get_item('auto-increment') == None:
+ auto_increment = domain.new_item('auto-increment')
+ auto_increment.add_value('value',0)
+ auto_increment.save(replace=True)
def log(self, node, component, message, logging=None):
domain = self.__domain(self.sdb, self.events)

0 comments on commit 574cb94

Please sign in to comment.