From 320508c927b976b7424e0504019a2b9595fea635 Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Mon, 23 Jan 2012 09:47:33 +0100 Subject: Nitrate: Boolean representation for the PlanStatus class --- Nitrate.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Nitrate.py b/Nitrate.py index 942264e..625efd2 100644 --- a/Nitrate.py +++ b/Nitrate.py @@ -934,6 +934,10 @@ class PlanStatus(Nitrate): """ Return plan status name for printing. """ return self.name + def __nonzero__(self): + """ Boolean status representation """ + return self._id != 0 + @property def id(self): """ Numeric plan status id. """ -- cgit