From 83525c42c749a6908ce7f623594d7bd3d3f1084e Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 11 Feb 2013 14:59:31 +0100 Subject: [PATCH] Prevent against 'created_at' field being None. --- rq/job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/job.py b/rq/job.py index 2000806..746e625 100644 --- a/rq/job.py +++ b/rq/job.py @@ -289,7 +289,7 @@ class Job(object): key = self.key obj = {} - obj['created_at'] = times.format(self.created_at, 'UTC') + obj['created_at'] = times.format(self.created_at or times.now(), 'UTC') if self.func_name is not None: obj['data'] = dumps(self.job_tuple)