Task message init None check

This commit is contained in:
İsmail Başaran 2016-04-05 17:57:35 +03:00
parent 30689c31ad
commit e35f538387

View file

@ -11,7 +11,10 @@ class Task(object):
"""docstring for Task""" """docstring for Task"""
def __init__(self, message): def __init__(self, message):
self.task = message['task'] #TODO message must be json !!! otherwise we can not use task json methods!
#Remove if condition and change message param to json task type.
if message:
self.task = message['task']
@property @property
def id(self): def id(self):