From 0aab2a95f4e635983d9a6104f1c8b05099c31131 Mon Sep 17 00:00:00 2001 From: JR Conlin Date: Thu, 13 Oct 2016 12:37:24 -0700 Subject: [PATCH] fix: Set TTL to 0 if None when doing expiration checks (#701) closes: #700 --- autopush/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopush/utils.py b/autopush/utils.py index 56f00aa1..8527b6c0 100644 --- a/autopush/utils.py +++ b/autopush/utils.py @@ -380,7 +380,7 @@ def expired(self, at_time=None): """ now = at_time or int(time.time()) - return now >= (self.ttl + self.timestamp) + return now >= ((self.ttl or 0) + self.timestamp) @classmethod def from_message_table(cls, uaid, item):