import items

This commit is contained in:
j 2014-05-16 16:30:16 +02:00
commit 823ae2a676
11 changed files with 181 additions and 36 deletions

View file

@ -56,6 +56,15 @@ class Changelog(db.Model):
def timestamp(self):
return self.created.strftime('%s')
@classmethod
def apply_changes(cls, user, changes):
for change in changes:
if not Changelog.apply_change(user, change):
print 'FAIL', change
break
return False
return True
@classmethod
def apply_change(cls, user, change, rebuild=False):
revision, timestamp, sig, data = change