def as_dict(self):
        return {
            'id': self.id,
            'closed': self.closed,
            'data': self.task_data
        }
Converts the model-instance into a safe and lightweight dictionary.
dataset/ETHPy150Open mrgambal/vulyk/vulyk/models/tasks.py/AbstractTask.as_dict