From: Holger Levsen Date: Wed, 2 Nov 2011 11:32:32 +0000 (+0100) Subject: fix persistence X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=4303e2cf0e391cb3171e41015428c05c183b70f5;p=profitbricks%2Fjenkins-build-scripts.git fix persistence --- diff --git a/kernel_persistence.py b/kernel_persistence.py index 4810f65..7165676 100644 --- a/kernel_persistence.py +++ b/kernel_persistence.py @@ -43,8 +43,8 @@ class KernelVersion(Base): self.pb_modules = pb_modules def __repr__(self): - return '' %( - self.identifier, self.last_version + return '' %( + self.identifier, self.last_version, self.branch_name, self.pb_modules ) def get_last_kernel_revision_obj(branch): @@ -62,7 +62,7 @@ def get_last_kernel_revision_obj(branch): answ = session.query(KernelVersion).filter( KernelVersion.identifier == persistence_identifier).one() except NoResultFound: - session.add(KernelVersion(persistence_identifier, 0)) + session.add(KernelVersion(persistence_identifier, 0, branch, '')) session.commit() answ = session.query(KernelVersion).filter( KernelVersion.identifier == persistence_identifier).one()