diff rhodecode/model/db.py @ 2296:e5c0f201ca0b codereview

Add changeset status change into emails
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 17 May 2012 12:54:44 +0200
parents 8447d35b674e
children 20e307d5250f
line wrap: on
line diff
--- a/rhodecode/model/db.py	Thu May 17 00:47:45 2012 +0200
+++ b/rhodecode/model/db.py	Thu May 17 12:54:44 2012 +0200
@@ -1256,9 +1256,13 @@
     repo = relationship('Repository')
     comment = relationship('ChangesetComment', lazy='joined')
 
+    @classmethod
+    def get_status_lbl(cls, value):
+        return dict(cls.STATUSES).get(value)
+
     @property
     def status_lbl(self):
-        return dict(self.STATUSES).get(self.status)
+        return ChangesetStatus.get_status_lbl(self.status)
 
 
 class Notification(Base, BaseModel):